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
My compilation target is ES2018 and my lib is ["ES2016", "dom"].
Missing / Incorrect Imprecise Definitions
At least toUpperCase and toLowerCase methods on String, maybe/probably also the Locale versions?
Sample Code
typeLittleT="t"|"tt";typeBigT=Uppercase<LittleT>;declareconstsmol: LittleT;constbig: BigT=smol.toUpperCase();// err, string is not assignable to "T" | "TT
I'm not sure about the Locale versions of these methods because I don't know what algorithm the "intrinsic" Uppercase<T> / Lowercase<T> helper types are required to follow. (Do we need separate LocaleUppercase / LocaleLowercase helpers?)
Also worth mentioning: I think what I'm looking for is a return type of e.g. Uppercase<this>, which shouldn't have an impact on non-literal string types because Uppercase<string> is just string.
lib Update Request
Configuration Check
My compilation target is
ES2018and my lib is["ES2016", "dom"].Missing / IncorrectImprecise DefinitionsAt least
toUpperCaseandtoLowerCasemethods onString, maybe/probably also theLocaleversions?Sample Code
Documentation Link
https://tc39.es/ecma262/#sec-string.prototype.tolowercase
Note
I'm not sure about the
Localeversions of these methods because I don't know what algorithm the "intrinsic"Uppercase<T>/Lowercase<T>helper types are required to follow. (Do we need separateLocaleUppercase/LocaleLowercasehelpers?)Also worth mentioning: I think what I'm looking for is a return type of e.g.
Uppercase<this>, which shouldn't have an impact on non-literal string types becauseUppercase<string>is juststring.