@@ -167,6 +167,7 @@ namespace ts {
167167 DeclareKeyword ,
168168 GetKeyword ,
169169 InferKeyword ,
170+ IntrinsicKeyword ,
170171 IsKeyword ,
171172 KeyOfKeyword ,
172173 ModuleKeyword ,
@@ -186,10 +187,6 @@ namespace ts {
186187 FromKeyword ,
187188 GlobalKeyword ,
188189 BigIntKeyword ,
189- UppercaseKeyword ,
190- LowercaseKeyword ,
191- CapitalizeKeyword ,
192- UncapitalizeKeyword ,
193190 OfKeyword , // LastKeyword and LastToken and LastContextualKeyword
194191
195192 // Parse tree nodes
@@ -544,7 +541,6 @@ namespace ts {
544541 | SyntaxKind . BigIntKeyword
545542 | SyntaxKind . BooleanKeyword
546543 | SyntaxKind . BreakKeyword
547- | SyntaxKind . CapitalizeKeyword
548544 | SyntaxKind . CaseKeyword
549545 | SyntaxKind . CatchKeyword
550546 | SyntaxKind . ClassKeyword
@@ -574,10 +570,10 @@ namespace ts {
574570 | SyntaxKind . InKeyword
575571 | SyntaxKind . InstanceOfKeyword
576572 | SyntaxKind . InterfaceKeyword
573+ | SyntaxKind . IntrinsicKeyword
577574 | SyntaxKind . IsKeyword
578575 | SyntaxKind . KeyOfKeyword
579576 | SyntaxKind . LetKeyword
580- | SyntaxKind . LowercaseKeyword
581577 | SyntaxKind . ModuleKeyword
582578 | SyntaxKind . NamespaceKeyword
583579 | SyntaxKind . NeverKeyword
@@ -605,11 +601,9 @@ namespace ts {
605601 | SyntaxKind . TryKeyword
606602 | SyntaxKind . TypeKeyword
607603 | SyntaxKind . TypeOfKeyword
608- | SyntaxKind . UncapitalizeKeyword
609604 | SyntaxKind . UndefinedKeyword
610605 | SyntaxKind . UniqueKeyword
611606 | SyntaxKind . UnknownKeyword
612- | SyntaxKind . UppercaseKeyword
613607 | SyntaxKind . VarKeyword
614608 | SyntaxKind . VoidKeyword
615609 | SyntaxKind . WhileKeyword
@@ -635,6 +629,7 @@ namespace ts {
635629 | SyntaxKind . AnyKeyword
636630 | SyntaxKind . BigIntKeyword
637631 | SyntaxKind . BooleanKeyword
632+ | SyntaxKind . IntrinsicKeyword
638633 | SyntaxKind . NeverKeyword
639634 | SyntaxKind . NumberKeyword
640635 | SyntaxKind . ObjectKeyword
@@ -1665,19 +1660,10 @@ namespace ts {
16651660 export interface TemplateLiteralTypeSpan extends TypeNode {
16661661 readonly kind : SyntaxKind . TemplateLiteralTypeSpan ,
16671662 readonly parent : TemplateLiteralTypeNode ;
1668- readonly casing : TemplateCasing ;
16691663 readonly type : TypeNode ;
16701664 readonly literal : TemplateMiddle | TemplateTail ;
16711665 }
16721666
1673- export const enum TemplateCasing {
1674- None ,
1675- Uppercase ,
1676- Lowercase ,
1677- Capitalize ,
1678- Uncapitalize ,
1679- }
1680-
16811667 // Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing.
16821668 // Consider 'Expression'. Without the brand, 'Expression' is actually no different
16831669 // (structurally) than 'Node'. Because of this you can pass any Node to a function that
@@ -4892,6 +4878,7 @@ namespace ts {
48924878 Substitution = 1 << 25 , // Type parameter substitution
48934879 NonPrimitive = 1 << 26 , // intrinsic object type
48944880 TemplateLiteral = 1 << 27 , // Template literal type
4881+ StringMapping = 1 << 28 , // Uppercase/Lowercase type
48954882
48964883 /* @internal */
48974884 AnyOrUnknown = Any | Unknown ,
@@ -4909,7 +4896,7 @@ namespace ts {
49094896 Intrinsic = Any | Unknown | String | Number | BigInt | Boolean | BooleanLiteral | ESSymbol | Void | Undefined | Null | Never | NonPrimitive ,
49104897 /* @internal */
49114898 Primitive = String | Number | BigInt | Boolean | Enum | EnumLiteral | ESSymbol | Void | Undefined | Null | Literal | UniqueESSymbol ,
4912- StringLike = String | StringLiteral | TemplateLiteral ,
4899+ StringLike = String | StringLiteral | TemplateLiteral | StringMapping ,
49134900 NumberLike = Number | NumberLiteral | Enum ,
49144901 BigIntLike = BigInt | BigIntLiteral ,
49154902 BooleanLike = Boolean | BooleanLiteral ,
@@ -4922,15 +4909,15 @@ namespace ts {
49224909 StructuredType = Object | Union | Intersection ,
49234910 TypeVariable = TypeParameter | IndexedAccess ,
49244911 InstantiableNonPrimitive = TypeVariable | Conditional | Substitution ,
4925- InstantiablePrimitive = Index | TemplateLiteral ,
4912+ InstantiablePrimitive = Index | TemplateLiteral | StringMapping ,
49264913 Instantiable = InstantiableNonPrimitive | InstantiablePrimitive ,
49274914 StructuredOrInstantiable = StructuredType | Instantiable ,
49284915 /* @internal */
49294916 ObjectFlagsType = Any | Nullable | Never | Object | Union | Intersection ,
49304917 /* @internal */
49314918 Simplifiable = IndexedAccess | Conditional ,
49324919 /* @internal */
4933- Substructure = Object | Union | Intersection | Index | IndexedAccess | Conditional | Substitution | TemplateLiteral ,
4920+ Substructure = Object | Union | Intersection | Index | IndexedAccess | Conditional | Substitution | TemplateLiteral | StringMapping ,
49344921 // 'Narrowable' types are types where narrowing actually narrows.
49354922 // This *should* be every type other than null, undefined, void, and never
49364923 Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive ,
@@ -5379,11 +5366,15 @@ namespace ts {
53795366 }
53805367
53815368 export interface TemplateLiteralType extends InstantiableType {
5382- texts : readonly string [ ] ; // Always one element longer than casings/types
5383- casings : readonly TemplateCasing [ ] ; // Always at least one element
5369+ texts : readonly string [ ] ; // Always one element longer than types
53845370 types : readonly Type [ ] ; // Always at least one element
53855371 }
53865372
5373+ export interface StringMappingType extends InstantiableType {
5374+ symbol : Symbol ;
5375+ type : Type ;
5376+ }
5377+
53875378 // Type parameter substitution (TypeFlags.Substitution)
53885379 // Substitution types are created for type parameters or indexed access types that occur in the
53895380 // true branch of a conditional type. For example, in 'T extends string ? Foo<T> : Bar<T>', the
@@ -6774,8 +6765,8 @@ namespace ts {
67746765 createIndexSignature ( decorators : readonly Decorator [ ] | undefined , modifiers : readonly Modifier [ ] | undefined , parameters : readonly ParameterDeclaration [ ] , type : TypeNode ) : IndexSignatureDeclaration ;
67756766 /* @internal */ createIndexSignature ( decorators : readonly Decorator [ ] | undefined , modifiers : readonly Modifier [ ] | undefined , parameters : readonly ParameterDeclaration [ ] , type : TypeNode | undefined ) : IndexSignatureDeclaration ; // eslint-disable-line @typescript-eslint/unified-signatures
67766767 updateIndexSignature ( node : IndexSignatureDeclaration , decorators : readonly Decorator [ ] | undefined , modifiers : readonly Modifier [ ] | undefined , parameters : readonly ParameterDeclaration [ ] , type : TypeNode ) : IndexSignatureDeclaration ;
6777- createTemplateLiteralTypeSpan ( casing : TemplateCasing , type : TypeNode , literal : TemplateMiddle | TemplateTail ) : TemplateLiteralTypeSpan ;
6778- updateTemplateLiteralTypeSpan ( casing : TemplateCasing , node : TemplateLiteralTypeSpan , type : TypeNode , literal : TemplateMiddle | TemplateTail ) : TemplateLiteralTypeSpan ;
6768+ createTemplateLiteralTypeSpan ( type : TypeNode , literal : TemplateMiddle | TemplateTail ) : TemplateLiteralTypeSpan ;
6769+ updateTemplateLiteralTypeSpan ( node : TemplateLiteralTypeSpan , type : TypeNode , literal : TemplateMiddle | TemplateTail ) : TemplateLiteralTypeSpan ;
67796770
67806771 //
67816772 // Types
0 commit comments