-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
proposal-record-tuple #39831
Comments
FYI we're tracking these as part of our TC39 committee attendance, so there's not really a need to have TS issues for every stage 2 proposal - we don't want to fracture the discussion. |
Hi @RyanCavanaugh, I understand, but also share @Kingwl's concern. This is not a regular TC39 proposal. It introduces a global constructor which may cause a breaking change in TypeScript. It would be kind of you if you could share TypeScript's stance about the naming. Does it look like |
@armanozak I think it's might be ok. The ctor 'Record' is value and Record<> is type. TypeScript is work fine with this case. As the result, the type of record might be 'record', the lower case. Like number and Number, string and String. |
But i'm not sure the other case. eg: Array ctor has type parameter, But seems Record cannot. |
Hi @Kingwl, The type is However, TypeScript |
Working on this #45546 |
@armanozak have there been cases where there was such a big possible breaking change before? How is TypeScript supposed to handle such a change? Hypothetically speaking, if it'll actually happen, what would be the protocol for that? Major change and GL codemodding the broken changes? |
https://github.com/tc39/proposal-record-tuple is stage-2.
I haven't found related issue and I created this.
I'm a little worry about the global Record object and our utils type Record<>.
The text was updated successfully, but these errors were encountered: