Migrate String
to StringPrototype
, Number
to NumberPrototype
, etc
#55175
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Suggestion
π Search Terms
string prototype object number stringprototype
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
We're always seeing people writing
String
,Number
,Object
, and so on, in places where they should be writing their primitive equivalents.We should mark these as
@deprecated
so that they show up with strikethroughs in the editor, and make new global interfaces named e.g.StringPrototype
so it's more clear what they're for.For back compat, possibly forever, we'll need to declare these as
so that existing references to
String["charAt"]
continue to work and so that other merges continue to function.π Motivating Example
π» Use Cases
The text was updated successfully, but these errors were encountered: