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
Update typescript to 4.8 #14880
Update typescript to 4.8 #14880
Conversation
@@ -10,7 +10,9 @@ export function finalize<T>(deepArr: DeepArray<T>): ReadonlyDeepArray<T> { | |||
return Object.freeze(deepArr) as ReadonlyDeepArray<T>; | |||
} | |||
|
|||
export function flattenToSet<T>(arr: ReadonlyDeepArray<T>): Set<T> { | |||
export function flattenToSet<T extends string>( |
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.
T
is constrained to string
so that Array.isArray(el)
can effectively differentiate between ReadonlyDeepArray<T>
and T
.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52822/ |
There is the OOM error you mentioned :/
This should be a new bug, not even enabling |
ts4.7
ts4.8
This should be a regression. But I personally don't mind letting it merge first to avoid blocking our development progress. |
@liuxingbaoyu might be related microsoft/TypeScript#50290 (comment) |
@nstepien |
I'm sure I don't know what's going on.😅 |
Co-authored-by: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com>
Yeah the error is expected, |
You're right, I seem to be closer to making a repo that reproduces, albeit just as complicated. 😂 |
@liuxingbaoyu A smaller reproduction will be great! I am drafting an issue to the TS repo. If you come up with a smaller reproduction, please let me know and I can update the issue. |
https://github.com/liuxingbaoyu/babel-ts4.8-bug |
Also removed
babel-parser
's tsconfig now that we have converted the parser to TS.