Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert entry file to ts #1759

Merged
merged 6 commits into from
Jul 8, 2021

Conversation

myNameIsDu
Copy link
Contributor

  • I added the entry file export type

  • I reviewed @type/react-redux. Except for the type definitions of functional methods such as connect, the others all exist, but it may need to be checked again

  • Slightly modified connect and connectAdvanced. Note that in @types/react-redux connectOptions are called options. ConnectAdvancedOptions is called ConnectOptions, I think this may not be great, so I changed it

  • I did not find the role of alternate-renderers.js, so I haven't changed it yet

Ref: #1737

@netlify
Copy link

netlify bot commented Jul 7, 2021

✔️ Deploy Preview for react-redux-docs ready!

🔨 Explore the source changes: cc3bd2f

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-redux-docs/deploys/60e6a2a75ea8250007430936

😎 Browse the preview: https://deploy-preview-1759--react-redux-docs.netlify.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 8, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cc3bd2f:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration

@markerikson
Copy link
Contributor

Cool, this looks like it's pretty good for now.

FYI, alternate-renderers is the same as index.{js,ts}, but it doesn't turn on React's batched updates for our subscriptions. That's because unstable_batchedUpdates only exists for ReactDOM and React Native for the most part - other renderers like ink don't have that.

We could potentially put all of our exports into something like exports.ts, and then have index.ts just do:

export * from './exports'

import { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates'

setBatch(batch)

and alternate-renderers.ts would be just be export * from './exports'

that would at least ensure things don't get out of sync.

@markerikson markerikson merged commit 17ddf9d into reduxjs:typescript-port Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants