-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix import order #37510
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix import order #37510
Conversation
|
Note that the problem is that the order of overloads wrongly looks like race<T>(values: Iterable<T | PromiseLike<T>>): Promise<awaited T>;
race<T>(values: readonly (T | PromiseLike<T>)[]): Promise<awaited T>; from the current definition
but actually race<T>(values: readonly (T | PromiseLike<T>)[]): Promise<awaited T>;
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<awaited T>; because es2015.generator loads es2015.iterable. This misleading confuses us. |
This won't affect the resolution order, as the order is explicitly specified in commandLineParser.ts |
This fixes the definition order which doesn't match the resolution order. |
The order they are specified in the lib files shouldn't matter in the slightest. The order they are loaded (and the order of the definitions) should come from the |
The current definition order sometimes confuses us as I mentioned at #37510 (comment). And as you said "This won't affect the resolution order", you have no reason to keep the current definition order which doesn't match the resolution order. |
I think we need this for the playground to generate a reasonable @typescript-bot pack this |
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at b9a7fe0. You can monitor the build here. |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
I agree that this list should at least strive to match the one that we reorder automatically. Not doing so has caused issues (see microsoft/TypeScript-Website#409). Maybe the list should start with a leading comment telling users to keep the list in sync. |
Component commits: b9a7fe0 Fix import order
Hey @DanielRosenwasser, I've opened #37628 for you. |
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build. |
Yup, it definitely matters. Just annoying that I have to redo the VS-side syncing now even though it won't be affected. |
Thanks @falsandtru! |
Separated from #36368