You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Aleksey Levenstein, Peter Hozák, Taro and Anton Mikhailov
I understand, but also share Wenlu Wang (@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 Record is going to be the eventual name for that constructor or is it still subject to change?
Levent Arman Özak (@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.
The type is record and I am not worried about that. I am not even worried about the wrapper object type (like String, Number, and Boolean), because it is stated here that there will be no wrapper object instantiation.
However, TypeScript Record is not really a match for the proposed Record and that would cause confusion, don't you agree?
Reacted by Wenlu Wang, matt-senseye, Lou Cyx, Matthew Francis Brunetti and Kris Kalavantavanich
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?
Activity
RyanCavanaugh commentedon Jul 30, 2020
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.
armanozak commentedon Aug 2, 2020
Hi Ryan Cavanaugh (@RyanCavanaugh),
I understand, but also share Wenlu Wang (@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
Recordis going to be the eventual name for that constructor or is it still subject to change?Kingwl commentedon Aug 2, 2020
Levent Arman Özak (@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.
Kingwl commentedon Aug 2, 2020
But i'm not sure the other case. eg: Array ctor has type parameter, But seems Record cannot.
armanozak commentedon Aug 2, 2020
Hi Wenlu Wang (@Kingwl),
The type is
recordand I am not worried about that. I am not even worried about the wrapper object type (likeString,Number, andBoolean), because it is stated here that there will be no wrapper object instantiation.However, TypeScript
Recordis not really a match for the proposedRecordand that would cause confusion, don't you agree?Jack-Works commentedon Aug 23, 2021
Working on this #45546
gioragutt commentedon Oct 25, 2021
Levent Arman Özak (@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?