-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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 all the things to Typescript #3520
Conversation
be9c395
to
6d7de27
Compare
6d7de27
to
076d850
Compare
ok @timdorr this is ready for review. If it is too complex, I'm happy to slice and dice to bring each file individually into typescript-land |
@timdorr ping again, wondering how you'd like to proceed? |
DeepPartial, | ||
StoreCreator, | ||
StoreEnhancer | ||
} from '..' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just do an export
here since we're just shipping it back out? Actually, can't we do that for everything in this file? I'm guessing there's some silly Babel/Rollup + tree-shaking reason why not, but I figure I should ask :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's complicated - we will export them when merging index.d.ts into each file that it touches. For now, this is simplest.
I think we can do this in a big-bang. I'm also OK with there being broken tests in the ts-conversion branch temporarily. As long as it doesn't end up on master in a broken state, we're all good. |
This PR has some issues - I've learned a bit about TS, so I'm splitting them out into separate ones |
To add some clarity: We can either remove workarounds for broken tests and leave them temporarily broken, or just annotate that something is a workaround that is to be replaced later (maybe as a Again, broken is fine while we're in-progress on this stuff. |
I understand. However, because it is so difficult to debug broken types, I don't think it is as useful to break a whole bunch then try to fix them. I'm confident the work I'm doing now will be both correct and easier to evaluate. |
closing in favor of the smaller PRs |
OK, I'm good with that approach too! |
This is an incremental step. It converts the existing source to use Typescript, but using
index.d.ts
as the source for all types. I did it this way because the first branch I made had such extensive changes to the files, it assumed they were entirely new, and we lost the granular diffs this PR provides.A follow-up PR would then begin extracting the types from
index.d.ts
gradually, until done, and then the last PR would be the configuration changes totsconfig.ts
in both/
andtests/typescript
. In/
this will be turning on.d.ts
generation, and intests/typescript
it will be changing the base to point atsrc
instead ofindex.d.ts
This PR needs to be rebased after #3518 and #3519 are mergedEDIT: good to go!