mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
Scan bigint literals
This commit is contained in:
parent
0499f5d801
commit
188c07865a
@ -3697,9 +3697,13 @@ namespace ts {
|
||||
break;
|
||||
|
||||
case SyntaxKind.NumericLiteral:
|
||||
if ((<NumericLiteral>node).numericLiteralFlags & TokenFlags.BinaryOrOctalSpecifier) {
|
||||
const flags = (<NumericLiteral>node).numericLiteralFlags;
|
||||
if (flags & TokenFlags.BinaryOrOctalSpecifier) {
|
||||
transformFlags |= TransformFlags.AssertES2015;
|
||||
}
|
||||
if (flags & TokenFlags.BigInt) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
}
|
||||
break;
|
||||
|
||||
case SyntaxKind.ForOfStatement:
|
||||
@ -3718,6 +3722,7 @@ namespace ts {
|
||||
|
||||
case SyntaxKind.AnyKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.BigIntKeyword:
|
||||
case SyntaxKind.NeverKeyword:
|
||||
case SyntaxKind.ObjectKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
@ -3926,6 +3931,7 @@ namespace ts {
|
||||
return TransformFlags.MethodOrAccessorExcludes;
|
||||
case SyntaxKind.AnyKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.BigIntKeyword:
|
||||
case SyntaxKind.NeverKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
case SyntaxKind.ObjectKeyword:
|
||||
|
||||
@ -2247,8 +2247,7 @@ namespace ts {
|
||||
|
||||
function parseLiteralLikeNode(kind: SyntaxKind): LiteralExpression | LiteralLikeNode {
|
||||
const node = <LiteralExpression>createNode(kind);
|
||||
const text = scanner.getTokenValue();
|
||||
node.text = text;
|
||||
node.text = scanner.getTokenValue();
|
||||
|
||||
if (scanner.hasExtendedUnicodeEscape()) {
|
||||
node.hasExtendedUnicodeEscape = true;
|
||||
@ -2902,6 +2901,7 @@ namespace ts {
|
||||
case SyntaxKind.UnknownKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.BigIntKeyword:
|
||||
case SyntaxKind.SymbolKeyword:
|
||||
case SyntaxKind.BooleanKeyword:
|
||||
case SyntaxKind.UndefinedKeyword:
|
||||
@ -2960,6 +2960,7 @@ namespace ts {
|
||||
case SyntaxKind.UnknownKeyword:
|
||||
case SyntaxKind.StringKeyword:
|
||||
case SyntaxKind.NumberKeyword:
|
||||
case SyntaxKind.BigIntKeyword:
|
||||
case SyntaxKind.BooleanKeyword:
|
||||
case SyntaxKind.SymbolKeyword:
|
||||
case SyntaxKind.UniqueKeyword:
|
||||
|
||||
@ -64,6 +64,7 @@ namespace ts {
|
||||
abstract: SyntaxKind.AbstractKeyword,
|
||||
any: SyntaxKind.AnyKeyword,
|
||||
as: SyntaxKind.AsKeyword,
|
||||
bigint: SyntaxKind.BigIntKeyword,
|
||||
boolean: SyntaxKind.BooleanKeyword,
|
||||
break: SyntaxKind.BreakKeyword,
|
||||
case: SyntaxKind.CaseKeyword,
|
||||
@ -943,18 +944,26 @@ namespace ts {
|
||||
end = pos;
|
||||
}
|
||||
}
|
||||
let result: string;
|
||||
if (tokenFlags & TokenFlags.ContainsSeparator) {
|
||||
let result = mainFragment;
|
||||
result = mainFragment;
|
||||
if (decimalFragment) {
|
||||
result += "." + decimalFragment;
|
||||
}
|
||||
if (scientificFragment) {
|
||||
result += scientificFragment;
|
||||
}
|
||||
return "" + +result;
|
||||
}
|
||||
else {
|
||||
return "" + +(text.substring(start, end)); // No need to use all the fragments; no _ removal needed
|
||||
result = text.substring(start, end); // No need to use all the fragments; no _ removal needed
|
||||
}
|
||||
if (decimalFragment === undefined && !(tokenFlags & TokenFlags.Scientific)) {
|
||||
tokenValue = result;
|
||||
checkBigIntSuffix(); // if value is an integer, check whether it is a bigint
|
||||
return tokenValue;
|
||||
}
|
||||
else {
|
||||
return "" + +result; // if value is not an integer, it can be safely coerced to a number
|
||||
}
|
||||
}
|
||||
|
||||
@ -971,24 +980,24 @@ namespace ts {
|
||||
* returning -1 if the given number is unavailable.
|
||||
*/
|
||||
function scanExactNumberOfHexDigits(count: number, canHaveSeparators: boolean): number {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ false, canHaveSeparators);
|
||||
const valueString = scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ false, canHaveSeparators);
|
||||
return valueString ? parseInt(valueString, 16) : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scans as many hexadecimal digits as are available in the text,
|
||||
* returning -1 if the given number of digits was unavailable.
|
||||
* returning "" if the given number of digits was unavailable.
|
||||
*/
|
||||
function scanMinimumNumberOfHexDigits(count: number, canHaveSeparators: boolean): number {
|
||||
function scanMinimumNumberOfHexDigits(count: number, canHaveSeparators: boolean): string {
|
||||
return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ true, canHaveSeparators);
|
||||
}
|
||||
|
||||
function scanHexDigits(minCount: number, scanAsManyAsPossible: boolean, canHaveSeparators: boolean): number {
|
||||
let digits = 0;
|
||||
let value = 0;
|
||||
function scanHexDigits(minCount: number, scanAsManyAsPossible: boolean, canHaveSeparators: boolean): string {
|
||||
let valueChars: number[] = [];
|
||||
let allowSeparator = false;
|
||||
let isPreviousTokenSeparator = false;
|
||||
while (digits < minCount || scanAsManyAsPossible) {
|
||||
const ch = text.charCodeAt(pos);
|
||||
while (valueChars.length < minCount || scanAsManyAsPossible) {
|
||||
let ch = text.charCodeAt(pos);
|
||||
if (canHaveSeparators && ch === CharacterCodes._) {
|
||||
tokenFlags |= TokenFlags.ContainsSeparator;
|
||||
if (allowSeparator) {
|
||||
@ -1005,29 +1014,25 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
allowSeparator = canHaveSeparators;
|
||||
if (ch >= CharacterCodes._0 && ch <= CharacterCodes._9) {
|
||||
value = value * 16 + ch - CharacterCodes._0;
|
||||
if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) {
|
||||
ch += CharacterCodes.a - CharacterCodes.A; // standardize hex literals to lowercase
|
||||
}
|
||||
else if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) {
|
||||
value = value * 16 + ch - CharacterCodes.A + 10;
|
||||
}
|
||||
else if (ch >= CharacterCodes.a && ch <= CharacterCodes.f) {
|
||||
value = value * 16 + ch - CharacterCodes.a + 10;
|
||||
}
|
||||
else {
|
||||
else if (!((ch >= CharacterCodes._0 && ch <= CharacterCodes._9) ||
|
||||
(ch >= CharacterCodes.a && ch <= CharacterCodes.f)
|
||||
)) {
|
||||
break;
|
||||
}
|
||||
valueChars.push(ch);
|
||||
pos++;
|
||||
digits++;
|
||||
isPreviousTokenSeparator = false;
|
||||
}
|
||||
if (digits < minCount) {
|
||||
value = -1;
|
||||
if (valueChars.length < minCount) {
|
||||
valueChars = [];
|
||||
}
|
||||
if (text.charCodeAt(pos - 1) === CharacterCodes._) {
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
||||
}
|
||||
return value;
|
||||
return String.fromCharCode(...valueChars);
|
||||
}
|
||||
|
||||
function scanString(jsxAttributeString = false): string {
|
||||
@ -1207,7 +1212,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function scanExtendedUnicodeEscape(): string {
|
||||
const escapedValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false);
|
||||
const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false);
|
||||
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
||||
let isInvalidExtendedEscape = false;
|
||||
|
||||
// Validate the value of the digit
|
||||
@ -1309,13 +1315,10 @@ namespace ts {
|
||||
return token = SyntaxKind.Identifier;
|
||||
}
|
||||
|
||||
function scanBinaryOrOctalDigits(base: number): number {
|
||||
Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8");
|
||||
|
||||
let value = 0;
|
||||
function scanBinaryOrOctalDigits(base: 2 | 8): string {
|
||||
let value = "";
|
||||
// For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b.
|
||||
// Similarly valid octalIntegerLiteral must have at least one octal digit following o or O.
|
||||
let numberOfDigits = 0;
|
||||
let separatorAllowed = false;
|
||||
let isPreviousTokenSeparator = false;
|
||||
while (true) {
|
||||
@ -1337,27 +1340,41 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
separatorAllowed = true;
|
||||
const valueOfCh = ch - CharacterCodes._0;
|
||||
if (!isDigit(ch) || valueOfCh >= base) {
|
||||
if (!isDigit(ch) || ch - CharacterCodes._0 >= base) {
|
||||
break;
|
||||
}
|
||||
value = value * base + valueOfCh;
|
||||
value += text[pos];
|
||||
pos++;
|
||||
numberOfDigits++;
|
||||
isPreviousTokenSeparator = false;
|
||||
}
|
||||
// Invalid binaryIntegerLiteral or octalIntegerLiteral
|
||||
if (numberOfDigits === 0) {
|
||||
return -1;
|
||||
}
|
||||
if (text.charCodeAt(pos - 1) === CharacterCodes._) {
|
||||
// Literal ends with underscore - not allowed
|
||||
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function checkBigIntSuffix(): void {
|
||||
if (text.charCodeAt(pos) === CharacterCodes.n) {
|
||||
tokenFlags |= TokenFlags.BigInt;
|
||||
tokenValue += "n";
|
||||
// Use base 10 instead of base 2 or base 8 for shorter literals
|
||||
if (tokenFlags & TokenFlags.BinaryOrOctalSpecifier) {
|
||||
tokenValue = parsePseudoBigInt(tokenValue) + "n";
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
else { // not a bigint, so can convert to number in simplified form
|
||||
// Number() may not support 0b or 0o, so use parseInt() instead
|
||||
const numericValue = tokenFlags & TokenFlags.BinarySpecifier
|
||||
? parseInt(tokenValue.slice(2), 2) // skip "0b"
|
||||
: tokenFlags & TokenFlags.OctalSpecifier
|
||||
? parseInt(tokenValue.slice(2), 8) // skip "0o"
|
||||
: +tokenValue;
|
||||
tokenValue = "" + numericValue;
|
||||
}
|
||||
}
|
||||
|
||||
function scan(): SyntaxKind {
|
||||
startPos = pos;
|
||||
tokenFlags = 0;
|
||||
@ -1582,35 +1599,38 @@ namespace ts {
|
||||
case CharacterCodes._0:
|
||||
if (pos + 2 < end && (text.charCodeAt(pos + 1) === CharacterCodes.X || text.charCodeAt(pos + 1) === CharacterCodes.x)) {
|
||||
pos += 2;
|
||||
let value = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true);
|
||||
if (value < 0) {
|
||||
tokenValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true);
|
||||
if (!tokenValue) {
|
||||
error(Diagnostics.Hexadecimal_digit_expected);
|
||||
value = 0;
|
||||
tokenValue = "0";
|
||||
}
|
||||
tokenValue = "" + value;
|
||||
tokenValue = "0x" + tokenValue;
|
||||
tokenFlags |= TokenFlags.HexSpecifier;
|
||||
checkBigIntSuffix();
|
||||
return token = SyntaxKind.NumericLiteral;
|
||||
}
|
||||
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === CharacterCodes.B || text.charCodeAt(pos + 1) === CharacterCodes.b)) {
|
||||
pos += 2;
|
||||
let value = scanBinaryOrOctalDigits(/* base */ 2);
|
||||
if (value < 0) {
|
||||
tokenValue = scanBinaryOrOctalDigits(/* base */ 2);
|
||||
if (!tokenValue) {
|
||||
error(Diagnostics.Binary_digit_expected);
|
||||
value = 0;
|
||||
tokenValue = "0";
|
||||
}
|
||||
tokenValue = "" + value;
|
||||
tokenValue = "0b" + tokenValue;
|
||||
tokenFlags |= TokenFlags.BinarySpecifier;
|
||||
checkBigIntSuffix();
|
||||
return token = SyntaxKind.NumericLiteral;
|
||||
}
|
||||
else if (pos + 2 < end && (text.charCodeAt(pos + 1) === CharacterCodes.O || text.charCodeAt(pos + 1) === CharacterCodes.o)) {
|
||||
pos += 2;
|
||||
let value = scanBinaryOrOctalDigits(/* base */ 8);
|
||||
if (value < 0) {
|
||||
tokenValue = scanBinaryOrOctalDigits(/* base */ 8);
|
||||
if (!tokenValue) {
|
||||
error(Diagnostics.Octal_digit_expected);
|
||||
value = 0;
|
||||
tokenValue = "0";
|
||||
}
|
||||
tokenValue = "" + value;
|
||||
tokenValue = "0o" + tokenValue;
|
||||
tokenFlags |= TokenFlags.OctalSpecifier;
|
||||
checkBigIntSuffix();
|
||||
return token = SyntaxKind.NumericLiteral;
|
||||
}
|
||||
// Try to parse as an octal
|
||||
|
||||
@ -31,6 +31,7 @@ namespace ts {
|
||||
| SyntaxKind.AbstractKeyword
|
||||
| SyntaxKind.AnyKeyword
|
||||
| SyntaxKind.AsKeyword
|
||||
| SyntaxKind.BigIntKeyword
|
||||
| SyntaxKind.BooleanKeyword
|
||||
| SyntaxKind.BreakKeyword
|
||||
| SyntaxKind.CaseKeyword
|
||||
|
||||
443
tests/baselines/reference/api/tsserverlibrary.d.ts
vendored
443
tests/baselines/reference/api/tsserverlibrary.d.ts
vendored
@ -73,7 +73,7 @@ declare namespace ts {
|
||||
end: number;
|
||||
}
|
||||
type JsDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.Unknown | KeywordSyntaxKind;
|
||||
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
|
||||
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
|
||||
type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
|
||||
enum SyntaxKind {
|
||||
Unknown = 0,
|
||||
@ -221,172 +221,173 @@ declare namespace ts {
|
||||
UnknownKeyword = 142,
|
||||
FromKeyword = 143,
|
||||
GlobalKeyword = 144,
|
||||
OfKeyword = 145,
|
||||
QualifiedName = 146,
|
||||
ComputedPropertyName = 147,
|
||||
TypeParameter = 148,
|
||||
Parameter = 149,
|
||||
Decorator = 150,
|
||||
PropertySignature = 151,
|
||||
PropertyDeclaration = 152,
|
||||
MethodSignature = 153,
|
||||
MethodDeclaration = 154,
|
||||
Constructor = 155,
|
||||
GetAccessor = 156,
|
||||
SetAccessor = 157,
|
||||
CallSignature = 158,
|
||||
ConstructSignature = 159,
|
||||
IndexSignature = 160,
|
||||
TypePredicate = 161,
|
||||
TypeReference = 162,
|
||||
FunctionType = 163,
|
||||
ConstructorType = 164,
|
||||
TypeQuery = 165,
|
||||
TypeLiteral = 166,
|
||||
ArrayType = 167,
|
||||
TupleType = 168,
|
||||
OptionalType = 169,
|
||||
RestType = 170,
|
||||
UnionType = 171,
|
||||
IntersectionType = 172,
|
||||
ConditionalType = 173,
|
||||
InferType = 174,
|
||||
ParenthesizedType = 175,
|
||||
ThisType = 176,
|
||||
TypeOperator = 177,
|
||||
IndexedAccessType = 178,
|
||||
MappedType = 179,
|
||||
LiteralType = 180,
|
||||
ImportType = 181,
|
||||
ObjectBindingPattern = 182,
|
||||
ArrayBindingPattern = 183,
|
||||
BindingElement = 184,
|
||||
ArrayLiteralExpression = 185,
|
||||
ObjectLiteralExpression = 186,
|
||||
PropertyAccessExpression = 187,
|
||||
ElementAccessExpression = 188,
|
||||
CallExpression = 189,
|
||||
NewExpression = 190,
|
||||
TaggedTemplateExpression = 191,
|
||||
TypeAssertionExpression = 192,
|
||||
ParenthesizedExpression = 193,
|
||||
FunctionExpression = 194,
|
||||
ArrowFunction = 195,
|
||||
DeleteExpression = 196,
|
||||
TypeOfExpression = 197,
|
||||
VoidExpression = 198,
|
||||
AwaitExpression = 199,
|
||||
PrefixUnaryExpression = 200,
|
||||
PostfixUnaryExpression = 201,
|
||||
BinaryExpression = 202,
|
||||
ConditionalExpression = 203,
|
||||
TemplateExpression = 204,
|
||||
YieldExpression = 205,
|
||||
SpreadElement = 206,
|
||||
ClassExpression = 207,
|
||||
OmittedExpression = 208,
|
||||
ExpressionWithTypeArguments = 209,
|
||||
AsExpression = 210,
|
||||
NonNullExpression = 211,
|
||||
MetaProperty = 212,
|
||||
SyntheticExpression = 213,
|
||||
TemplateSpan = 214,
|
||||
SemicolonClassElement = 215,
|
||||
Block = 216,
|
||||
VariableStatement = 217,
|
||||
EmptyStatement = 218,
|
||||
ExpressionStatement = 219,
|
||||
IfStatement = 220,
|
||||
DoStatement = 221,
|
||||
WhileStatement = 222,
|
||||
ForStatement = 223,
|
||||
ForInStatement = 224,
|
||||
ForOfStatement = 225,
|
||||
ContinueStatement = 226,
|
||||
BreakStatement = 227,
|
||||
ReturnStatement = 228,
|
||||
WithStatement = 229,
|
||||
SwitchStatement = 230,
|
||||
LabeledStatement = 231,
|
||||
ThrowStatement = 232,
|
||||
TryStatement = 233,
|
||||
DebuggerStatement = 234,
|
||||
VariableDeclaration = 235,
|
||||
VariableDeclarationList = 236,
|
||||
FunctionDeclaration = 237,
|
||||
ClassDeclaration = 238,
|
||||
InterfaceDeclaration = 239,
|
||||
TypeAliasDeclaration = 240,
|
||||
EnumDeclaration = 241,
|
||||
ModuleDeclaration = 242,
|
||||
ModuleBlock = 243,
|
||||
CaseBlock = 244,
|
||||
NamespaceExportDeclaration = 245,
|
||||
ImportEqualsDeclaration = 246,
|
||||
ImportDeclaration = 247,
|
||||
ImportClause = 248,
|
||||
NamespaceImport = 249,
|
||||
NamedImports = 250,
|
||||
ImportSpecifier = 251,
|
||||
ExportAssignment = 252,
|
||||
ExportDeclaration = 253,
|
||||
NamedExports = 254,
|
||||
ExportSpecifier = 255,
|
||||
MissingDeclaration = 256,
|
||||
ExternalModuleReference = 257,
|
||||
JsxElement = 258,
|
||||
JsxSelfClosingElement = 259,
|
||||
JsxOpeningElement = 260,
|
||||
JsxClosingElement = 261,
|
||||
JsxFragment = 262,
|
||||
JsxOpeningFragment = 263,
|
||||
JsxClosingFragment = 264,
|
||||
JsxAttribute = 265,
|
||||
JsxAttributes = 266,
|
||||
JsxSpreadAttribute = 267,
|
||||
JsxExpression = 268,
|
||||
CaseClause = 269,
|
||||
DefaultClause = 270,
|
||||
HeritageClause = 271,
|
||||
CatchClause = 272,
|
||||
PropertyAssignment = 273,
|
||||
ShorthandPropertyAssignment = 274,
|
||||
SpreadAssignment = 275,
|
||||
EnumMember = 276,
|
||||
SourceFile = 277,
|
||||
Bundle = 278,
|
||||
UnparsedSource = 279,
|
||||
InputFiles = 280,
|
||||
JSDocTypeExpression = 281,
|
||||
JSDocAllType = 282,
|
||||
JSDocUnknownType = 283,
|
||||
JSDocNullableType = 284,
|
||||
JSDocNonNullableType = 285,
|
||||
JSDocOptionalType = 286,
|
||||
JSDocFunctionType = 287,
|
||||
JSDocVariadicType = 288,
|
||||
JSDocComment = 289,
|
||||
JSDocTypeLiteral = 290,
|
||||
JSDocSignature = 291,
|
||||
JSDocTag = 292,
|
||||
JSDocAugmentsTag = 293,
|
||||
JSDocClassTag = 294,
|
||||
JSDocCallbackTag = 295,
|
||||
JSDocEnumTag = 296,
|
||||
JSDocParameterTag = 297,
|
||||
JSDocReturnTag = 298,
|
||||
JSDocThisTag = 299,
|
||||
JSDocTypeTag = 300,
|
||||
JSDocTemplateTag = 301,
|
||||
JSDocTypedefTag = 302,
|
||||
JSDocPropertyTag = 303,
|
||||
SyntaxList = 304,
|
||||
NotEmittedStatement = 305,
|
||||
PartiallyEmittedExpression = 306,
|
||||
CommaListExpression = 307,
|
||||
MergeDeclarationMarker = 308,
|
||||
EndOfDeclarationMarker = 309,
|
||||
Count = 310,
|
||||
BigIntKeyword = 145,
|
||||
OfKeyword = 146,
|
||||
QualifiedName = 147,
|
||||
ComputedPropertyName = 148,
|
||||
TypeParameter = 149,
|
||||
Parameter = 150,
|
||||
Decorator = 151,
|
||||
PropertySignature = 152,
|
||||
PropertyDeclaration = 153,
|
||||
MethodSignature = 154,
|
||||
MethodDeclaration = 155,
|
||||
Constructor = 156,
|
||||
GetAccessor = 157,
|
||||
SetAccessor = 158,
|
||||
CallSignature = 159,
|
||||
ConstructSignature = 160,
|
||||
IndexSignature = 161,
|
||||
TypePredicate = 162,
|
||||
TypeReference = 163,
|
||||
FunctionType = 164,
|
||||
ConstructorType = 165,
|
||||
TypeQuery = 166,
|
||||
TypeLiteral = 167,
|
||||
ArrayType = 168,
|
||||
TupleType = 169,
|
||||
OptionalType = 170,
|
||||
RestType = 171,
|
||||
UnionType = 172,
|
||||
IntersectionType = 173,
|
||||
ConditionalType = 174,
|
||||
InferType = 175,
|
||||
ParenthesizedType = 176,
|
||||
ThisType = 177,
|
||||
TypeOperator = 178,
|
||||
IndexedAccessType = 179,
|
||||
MappedType = 180,
|
||||
LiteralType = 181,
|
||||
ImportType = 182,
|
||||
ObjectBindingPattern = 183,
|
||||
ArrayBindingPattern = 184,
|
||||
BindingElement = 185,
|
||||
ArrayLiteralExpression = 186,
|
||||
ObjectLiteralExpression = 187,
|
||||
PropertyAccessExpression = 188,
|
||||
ElementAccessExpression = 189,
|
||||
CallExpression = 190,
|
||||
NewExpression = 191,
|
||||
TaggedTemplateExpression = 192,
|
||||
TypeAssertionExpression = 193,
|
||||
ParenthesizedExpression = 194,
|
||||
FunctionExpression = 195,
|
||||
ArrowFunction = 196,
|
||||
DeleteExpression = 197,
|
||||
TypeOfExpression = 198,
|
||||
VoidExpression = 199,
|
||||
AwaitExpression = 200,
|
||||
PrefixUnaryExpression = 201,
|
||||
PostfixUnaryExpression = 202,
|
||||
BinaryExpression = 203,
|
||||
ConditionalExpression = 204,
|
||||
TemplateExpression = 205,
|
||||
YieldExpression = 206,
|
||||
SpreadElement = 207,
|
||||
ClassExpression = 208,
|
||||
OmittedExpression = 209,
|
||||
ExpressionWithTypeArguments = 210,
|
||||
AsExpression = 211,
|
||||
NonNullExpression = 212,
|
||||
MetaProperty = 213,
|
||||
SyntheticExpression = 214,
|
||||
TemplateSpan = 215,
|
||||
SemicolonClassElement = 216,
|
||||
Block = 217,
|
||||
VariableStatement = 218,
|
||||
EmptyStatement = 219,
|
||||
ExpressionStatement = 220,
|
||||
IfStatement = 221,
|
||||
DoStatement = 222,
|
||||
WhileStatement = 223,
|
||||
ForStatement = 224,
|
||||
ForInStatement = 225,
|
||||
ForOfStatement = 226,
|
||||
ContinueStatement = 227,
|
||||
BreakStatement = 228,
|
||||
ReturnStatement = 229,
|
||||
WithStatement = 230,
|
||||
SwitchStatement = 231,
|
||||
LabeledStatement = 232,
|
||||
ThrowStatement = 233,
|
||||
TryStatement = 234,
|
||||
DebuggerStatement = 235,
|
||||
VariableDeclaration = 236,
|
||||
VariableDeclarationList = 237,
|
||||
FunctionDeclaration = 238,
|
||||
ClassDeclaration = 239,
|
||||
InterfaceDeclaration = 240,
|
||||
TypeAliasDeclaration = 241,
|
||||
EnumDeclaration = 242,
|
||||
ModuleDeclaration = 243,
|
||||
ModuleBlock = 244,
|
||||
CaseBlock = 245,
|
||||
NamespaceExportDeclaration = 246,
|
||||
ImportEqualsDeclaration = 247,
|
||||
ImportDeclaration = 248,
|
||||
ImportClause = 249,
|
||||
NamespaceImport = 250,
|
||||
NamedImports = 251,
|
||||
ImportSpecifier = 252,
|
||||
ExportAssignment = 253,
|
||||
ExportDeclaration = 254,
|
||||
NamedExports = 255,
|
||||
ExportSpecifier = 256,
|
||||
MissingDeclaration = 257,
|
||||
ExternalModuleReference = 258,
|
||||
JsxElement = 259,
|
||||
JsxSelfClosingElement = 260,
|
||||
JsxOpeningElement = 261,
|
||||
JsxClosingElement = 262,
|
||||
JsxFragment = 263,
|
||||
JsxOpeningFragment = 264,
|
||||
JsxClosingFragment = 265,
|
||||
JsxAttribute = 266,
|
||||
JsxAttributes = 267,
|
||||
JsxSpreadAttribute = 268,
|
||||
JsxExpression = 269,
|
||||
CaseClause = 270,
|
||||
DefaultClause = 271,
|
||||
HeritageClause = 272,
|
||||
CatchClause = 273,
|
||||
PropertyAssignment = 274,
|
||||
ShorthandPropertyAssignment = 275,
|
||||
SpreadAssignment = 276,
|
||||
EnumMember = 277,
|
||||
SourceFile = 278,
|
||||
Bundle = 279,
|
||||
UnparsedSource = 280,
|
||||
InputFiles = 281,
|
||||
JSDocTypeExpression = 282,
|
||||
JSDocAllType = 283,
|
||||
JSDocUnknownType = 284,
|
||||
JSDocNullableType = 285,
|
||||
JSDocNonNullableType = 286,
|
||||
JSDocOptionalType = 287,
|
||||
JSDocFunctionType = 288,
|
||||
JSDocVariadicType = 289,
|
||||
JSDocComment = 290,
|
||||
JSDocTypeLiteral = 291,
|
||||
JSDocSignature = 292,
|
||||
JSDocTag = 293,
|
||||
JSDocAugmentsTag = 294,
|
||||
JSDocClassTag = 295,
|
||||
JSDocCallbackTag = 296,
|
||||
JSDocEnumTag = 297,
|
||||
JSDocParameterTag = 298,
|
||||
JSDocReturnTag = 299,
|
||||
JSDocThisTag = 300,
|
||||
JSDocTypeTag = 301,
|
||||
JSDocTemplateTag = 302,
|
||||
JSDocTypedefTag = 303,
|
||||
JSDocPropertyTag = 304,
|
||||
SyntaxList = 305,
|
||||
NotEmittedStatement = 306,
|
||||
PartiallyEmittedExpression = 307,
|
||||
CommaListExpression = 308,
|
||||
MergeDeclarationMarker = 309,
|
||||
EndOfDeclarationMarker = 310,
|
||||
Count = 311,
|
||||
FirstAssignment = 58,
|
||||
LastAssignment = 70,
|
||||
FirstCompoundAssignment = 59,
|
||||
@ -394,15 +395,15 @@ declare namespace ts {
|
||||
FirstReservedWord = 72,
|
||||
LastReservedWord = 107,
|
||||
FirstKeyword = 72,
|
||||
LastKeyword = 145,
|
||||
LastKeyword = 146,
|
||||
FirstFutureReservedWord = 108,
|
||||
LastFutureReservedWord = 116,
|
||||
FirstTypeNode = 161,
|
||||
LastTypeNode = 181,
|
||||
FirstTypeNode = 162,
|
||||
LastTypeNode = 182,
|
||||
FirstPunctuation = 17,
|
||||
LastPunctuation = 70,
|
||||
FirstToken = 0,
|
||||
LastToken = 145,
|
||||
LastToken = 146,
|
||||
FirstTriviaToken = 2,
|
||||
LastTriviaToken = 7,
|
||||
FirstLiteralToken = 8,
|
||||
@ -411,11 +412,11 @@ declare namespace ts {
|
||||
LastTemplateToken = 16,
|
||||
FirstBinaryOperator = 27,
|
||||
LastBinaryOperator = 70,
|
||||
FirstNode = 146,
|
||||
FirstJSDocNode = 281,
|
||||
LastJSDocNode = 303,
|
||||
FirstJSDocTagNode = 292,
|
||||
LastJSDocTagNode = 303
|
||||
FirstNode = 147,
|
||||
FirstJSDocNode = 282,
|
||||
LastJSDocNode = 304,
|
||||
FirstJSDocTagNode = 293,
|
||||
LastJSDocTagNode = 304
|
||||
}
|
||||
enum NodeFlags {
|
||||
None = 0,
|
||||
@ -727,7 +728,7 @@ declare namespace ts {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface KeywordTypeNode extends TypeNode {
|
||||
kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
|
||||
kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
|
||||
}
|
||||
interface ImportTypeNode extends NodeWithTypeArguments {
|
||||
kind: SyntaxKind.ImportType;
|
||||
@ -2164,44 +2165,47 @@ declare namespace ts {
|
||||
Number = 8,
|
||||
Boolean = 16,
|
||||
Enum = 32,
|
||||
StringLiteral = 64,
|
||||
NumberLiteral = 128,
|
||||
BooleanLiteral = 256,
|
||||
EnumLiteral = 512,
|
||||
ESSymbol = 1024,
|
||||
UniqueESSymbol = 2048,
|
||||
Void = 4096,
|
||||
Undefined = 8192,
|
||||
Null = 16384,
|
||||
Never = 32768,
|
||||
TypeParameter = 65536,
|
||||
Object = 131072,
|
||||
Union = 262144,
|
||||
Intersection = 524288,
|
||||
Index = 1048576,
|
||||
IndexedAccess = 2097152,
|
||||
Conditional = 4194304,
|
||||
Substitution = 8388608,
|
||||
NonPrimitive = 16777216,
|
||||
Literal = 448,
|
||||
Unit = 27072,
|
||||
StringOrNumberLiteral = 192,
|
||||
PossiblyFalsy = 29148,
|
||||
StringLike = 68,
|
||||
NumberLike = 168,
|
||||
BooleanLike = 272,
|
||||
EnumLike = 544,
|
||||
ESSymbolLike = 3072,
|
||||
VoidLike = 12288,
|
||||
UnionOrIntersection = 786432,
|
||||
StructuredType = 917504,
|
||||
TypeVariable = 2162688,
|
||||
InstantiableNonPrimitive = 14745600,
|
||||
InstantiablePrimitive = 1048576,
|
||||
Instantiable = 15794176,
|
||||
StructuredOrInstantiable = 16711680,
|
||||
Narrowable = 33492479,
|
||||
NotUnionOrUnit = 16909315
|
||||
BigInt = 64,
|
||||
StringLiteral = 128,
|
||||
NumberLiteral = 256,
|
||||
BooleanLiteral = 512,
|
||||
EnumLiteral = 1024,
|
||||
BigIntLiteral = 2048,
|
||||
ESSymbol = 4096,
|
||||
UniqueESSymbol = 8192,
|
||||
Void = 16384,
|
||||
Undefined = 32768,
|
||||
Null = 65536,
|
||||
Never = 131072,
|
||||
TypeParameter = 262144,
|
||||
Object = 524288,
|
||||
Union = 1048576,
|
||||
Intersection = 2097152,
|
||||
Index = 4194304,
|
||||
IndexedAccess = 8388608,
|
||||
Conditional = 16777216,
|
||||
Substitution = 33554432,
|
||||
NonPrimitive = 67108864,
|
||||
Literal = 2944,
|
||||
Unit = 109440,
|
||||
StringOrNumberLiteral = 384,
|
||||
PossiblyFalsy = 117724,
|
||||
StringLike = 132,
|
||||
NumberLike = 296,
|
||||
BigIntLike = 2112,
|
||||
BooleanLike = 528,
|
||||
EnumLike = 1056,
|
||||
ESSymbolLike = 12288,
|
||||
VoidLike = 49152,
|
||||
UnionOrIntersection = 3145728,
|
||||
StructuredType = 3670016,
|
||||
TypeVariable = 8650752,
|
||||
InstantiableNonPrimitive = 58982400,
|
||||
InstantiablePrimitive = 4194304,
|
||||
Instantiable = 63176704,
|
||||
StructuredOrInstantiable = 66846720,
|
||||
Narrowable = 133970943,
|
||||
NotUnionOrUnit = 67637251
|
||||
}
|
||||
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
interface Type {
|
||||
@ -2212,7 +2216,7 @@ declare namespace ts {
|
||||
aliasTypeArguments?: ReadonlyArray<Type>;
|
||||
}
|
||||
interface LiteralType extends Type {
|
||||
value: string | number;
|
||||
value: string | number | PseudoBigInt;
|
||||
freshType: LiteralType;
|
||||
regularType: LiteralType;
|
||||
}
|
||||
@ -2225,6 +2229,9 @@ declare namespace ts {
|
||||
interface NumberLiteralType extends LiteralType {
|
||||
value: number;
|
||||
}
|
||||
interface BigIntLiteralType extends LiteralType {
|
||||
value: PseudoBigInt;
|
||||
}
|
||||
interface EnumType extends Type {
|
||||
}
|
||||
enum ObjectFlags {
|
||||
@ -3657,9 +3664,9 @@ declare namespace ts {
|
||||
function createNodeArray<T extends Node>(elements?: ReadonlyArray<T>, hasTrailingComma?: boolean): NodeArray<T>;
|
||||
/** If a node is passed, creates a string literal whose source text is read from a source node during emit. */
|
||||
function createLiteral(value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
|
||||
function createLiteral(value: number): NumericLiteral;
|
||||
function createLiteral(value: number | PseudoBigInt): NumericLiteral;
|
||||
function createLiteral(value: boolean): BooleanLiteral;
|
||||
function createLiteral(value: string | number | boolean): PrimaryExpression;
|
||||
function createLiteral(value: string | number | PseudoBigInt | boolean): PrimaryExpression;
|
||||
function createNumericLiteral(value: string): NumericLiteral;
|
||||
function createStringLiteral(text: string): StringLiteral;
|
||||
function createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
|
||||
|
||||
443
tests/baselines/reference/api/typescript.d.ts
vendored
443
tests/baselines/reference/api/typescript.d.ts
vendored
@ -73,7 +73,7 @@ declare namespace ts {
|
||||
end: number;
|
||||
}
|
||||
type JsDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.Unknown | KeywordSyntaxKind;
|
||||
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
|
||||
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
|
||||
type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
|
||||
enum SyntaxKind {
|
||||
Unknown = 0,
|
||||
@ -221,172 +221,173 @@ declare namespace ts {
|
||||
UnknownKeyword = 142,
|
||||
FromKeyword = 143,
|
||||
GlobalKeyword = 144,
|
||||
OfKeyword = 145,
|
||||
QualifiedName = 146,
|
||||
ComputedPropertyName = 147,
|
||||
TypeParameter = 148,
|
||||
Parameter = 149,
|
||||
Decorator = 150,
|
||||
PropertySignature = 151,
|
||||
PropertyDeclaration = 152,
|
||||
MethodSignature = 153,
|
||||
MethodDeclaration = 154,
|
||||
Constructor = 155,
|
||||
GetAccessor = 156,
|
||||
SetAccessor = 157,
|
||||
CallSignature = 158,
|
||||
ConstructSignature = 159,
|
||||
IndexSignature = 160,
|
||||
TypePredicate = 161,
|
||||
TypeReference = 162,
|
||||
FunctionType = 163,
|
||||
ConstructorType = 164,
|
||||
TypeQuery = 165,
|
||||
TypeLiteral = 166,
|
||||
ArrayType = 167,
|
||||
TupleType = 168,
|
||||
OptionalType = 169,
|
||||
RestType = 170,
|
||||
UnionType = 171,
|
||||
IntersectionType = 172,
|
||||
ConditionalType = 173,
|
||||
InferType = 174,
|
||||
ParenthesizedType = 175,
|
||||
ThisType = 176,
|
||||
TypeOperator = 177,
|
||||
IndexedAccessType = 178,
|
||||
MappedType = 179,
|
||||
LiteralType = 180,
|
||||
ImportType = 181,
|
||||
ObjectBindingPattern = 182,
|
||||
ArrayBindingPattern = 183,
|
||||
BindingElement = 184,
|
||||
ArrayLiteralExpression = 185,
|
||||
ObjectLiteralExpression = 186,
|
||||
PropertyAccessExpression = 187,
|
||||
ElementAccessExpression = 188,
|
||||
CallExpression = 189,
|
||||
NewExpression = 190,
|
||||
TaggedTemplateExpression = 191,
|
||||
TypeAssertionExpression = 192,
|
||||
ParenthesizedExpression = 193,
|
||||
FunctionExpression = 194,
|
||||
ArrowFunction = 195,
|
||||
DeleteExpression = 196,
|
||||
TypeOfExpression = 197,
|
||||
VoidExpression = 198,
|
||||
AwaitExpression = 199,
|
||||
PrefixUnaryExpression = 200,
|
||||
PostfixUnaryExpression = 201,
|
||||
BinaryExpression = 202,
|
||||
ConditionalExpression = 203,
|
||||
TemplateExpression = 204,
|
||||
YieldExpression = 205,
|
||||
SpreadElement = 206,
|
||||
ClassExpression = 207,
|
||||
OmittedExpression = 208,
|
||||
ExpressionWithTypeArguments = 209,
|
||||
AsExpression = 210,
|
||||
NonNullExpression = 211,
|
||||
MetaProperty = 212,
|
||||
SyntheticExpression = 213,
|
||||
TemplateSpan = 214,
|
||||
SemicolonClassElement = 215,
|
||||
Block = 216,
|
||||
VariableStatement = 217,
|
||||
EmptyStatement = 218,
|
||||
ExpressionStatement = 219,
|
||||
IfStatement = 220,
|
||||
DoStatement = 221,
|
||||
WhileStatement = 222,
|
||||
ForStatement = 223,
|
||||
ForInStatement = 224,
|
||||
ForOfStatement = 225,
|
||||
ContinueStatement = 226,
|
||||
BreakStatement = 227,
|
||||
ReturnStatement = 228,
|
||||
WithStatement = 229,
|
||||
SwitchStatement = 230,
|
||||
LabeledStatement = 231,
|
||||
ThrowStatement = 232,
|
||||
TryStatement = 233,
|
||||
DebuggerStatement = 234,
|
||||
VariableDeclaration = 235,
|
||||
VariableDeclarationList = 236,
|
||||
FunctionDeclaration = 237,
|
||||
ClassDeclaration = 238,
|
||||
InterfaceDeclaration = 239,
|
||||
TypeAliasDeclaration = 240,
|
||||
EnumDeclaration = 241,
|
||||
ModuleDeclaration = 242,
|
||||
ModuleBlock = 243,
|
||||
CaseBlock = 244,
|
||||
NamespaceExportDeclaration = 245,
|
||||
ImportEqualsDeclaration = 246,
|
||||
ImportDeclaration = 247,
|
||||
ImportClause = 248,
|
||||
NamespaceImport = 249,
|
||||
NamedImports = 250,
|
||||
ImportSpecifier = 251,
|
||||
ExportAssignment = 252,
|
||||
ExportDeclaration = 253,
|
||||
NamedExports = 254,
|
||||
ExportSpecifier = 255,
|
||||
MissingDeclaration = 256,
|
||||
ExternalModuleReference = 257,
|
||||
JsxElement = 258,
|
||||
JsxSelfClosingElement = 259,
|
||||
JsxOpeningElement = 260,
|
||||
JsxClosingElement = 261,
|
||||
JsxFragment = 262,
|
||||
JsxOpeningFragment = 263,
|
||||
JsxClosingFragment = 264,
|
||||
JsxAttribute = 265,
|
||||
JsxAttributes = 266,
|
||||
JsxSpreadAttribute = 267,
|
||||
JsxExpression = 268,
|
||||
CaseClause = 269,
|
||||
DefaultClause = 270,
|
||||
HeritageClause = 271,
|
||||
CatchClause = 272,
|
||||
PropertyAssignment = 273,
|
||||
ShorthandPropertyAssignment = 274,
|
||||
SpreadAssignment = 275,
|
||||
EnumMember = 276,
|
||||
SourceFile = 277,
|
||||
Bundle = 278,
|
||||
UnparsedSource = 279,
|
||||
InputFiles = 280,
|
||||
JSDocTypeExpression = 281,
|
||||
JSDocAllType = 282,
|
||||
JSDocUnknownType = 283,
|
||||
JSDocNullableType = 284,
|
||||
JSDocNonNullableType = 285,
|
||||
JSDocOptionalType = 286,
|
||||
JSDocFunctionType = 287,
|
||||
JSDocVariadicType = 288,
|
||||
JSDocComment = 289,
|
||||
JSDocTypeLiteral = 290,
|
||||
JSDocSignature = 291,
|
||||
JSDocTag = 292,
|
||||
JSDocAugmentsTag = 293,
|
||||
JSDocClassTag = 294,
|
||||
JSDocCallbackTag = 295,
|
||||
JSDocEnumTag = 296,
|
||||
JSDocParameterTag = 297,
|
||||
JSDocReturnTag = 298,
|
||||
JSDocThisTag = 299,
|
||||
JSDocTypeTag = 300,
|
||||
JSDocTemplateTag = 301,
|
||||
JSDocTypedefTag = 302,
|
||||
JSDocPropertyTag = 303,
|
||||
SyntaxList = 304,
|
||||
NotEmittedStatement = 305,
|
||||
PartiallyEmittedExpression = 306,
|
||||
CommaListExpression = 307,
|
||||
MergeDeclarationMarker = 308,
|
||||
EndOfDeclarationMarker = 309,
|
||||
Count = 310,
|
||||
BigIntKeyword = 145,
|
||||
OfKeyword = 146,
|
||||
QualifiedName = 147,
|
||||
ComputedPropertyName = 148,
|
||||
TypeParameter = 149,
|
||||
Parameter = 150,
|
||||
Decorator = 151,
|
||||
PropertySignature = 152,
|
||||
PropertyDeclaration = 153,
|
||||
MethodSignature = 154,
|
||||
MethodDeclaration = 155,
|
||||
Constructor = 156,
|
||||
GetAccessor = 157,
|
||||
SetAccessor = 158,
|
||||
CallSignature = 159,
|
||||
ConstructSignature = 160,
|
||||
IndexSignature = 161,
|
||||
TypePredicate = 162,
|
||||
TypeReference = 163,
|
||||
FunctionType = 164,
|
||||
ConstructorType = 165,
|
||||
TypeQuery = 166,
|
||||
TypeLiteral = 167,
|
||||
ArrayType = 168,
|
||||
TupleType = 169,
|
||||
OptionalType = 170,
|
||||
RestType = 171,
|
||||
UnionType = 172,
|
||||
IntersectionType = 173,
|
||||
ConditionalType = 174,
|
||||
InferType = 175,
|
||||
ParenthesizedType = 176,
|
||||
ThisType = 177,
|
||||
TypeOperator = 178,
|
||||
IndexedAccessType = 179,
|
||||
MappedType = 180,
|
||||
LiteralType = 181,
|
||||
ImportType = 182,
|
||||
ObjectBindingPattern = 183,
|
||||
ArrayBindingPattern = 184,
|
||||
BindingElement = 185,
|
||||
ArrayLiteralExpression = 186,
|
||||
ObjectLiteralExpression = 187,
|
||||
PropertyAccessExpression = 188,
|
||||
ElementAccessExpression = 189,
|
||||
CallExpression = 190,
|
||||
NewExpression = 191,
|
||||
TaggedTemplateExpression = 192,
|
||||
TypeAssertionExpression = 193,
|
||||
ParenthesizedExpression = 194,
|
||||
FunctionExpression = 195,
|
||||
ArrowFunction = 196,
|
||||
DeleteExpression = 197,
|
||||
TypeOfExpression = 198,
|
||||
VoidExpression = 199,
|
||||
AwaitExpression = 200,
|
||||
PrefixUnaryExpression = 201,
|
||||
PostfixUnaryExpression = 202,
|
||||
BinaryExpression = 203,
|
||||
ConditionalExpression = 204,
|
||||
TemplateExpression = 205,
|
||||
YieldExpression = 206,
|
||||
SpreadElement = 207,
|
||||
ClassExpression = 208,
|
||||
OmittedExpression = 209,
|
||||
ExpressionWithTypeArguments = 210,
|
||||
AsExpression = 211,
|
||||
NonNullExpression = 212,
|
||||
MetaProperty = 213,
|
||||
SyntheticExpression = 214,
|
||||
TemplateSpan = 215,
|
||||
SemicolonClassElement = 216,
|
||||
Block = 217,
|
||||
VariableStatement = 218,
|
||||
EmptyStatement = 219,
|
||||
ExpressionStatement = 220,
|
||||
IfStatement = 221,
|
||||
DoStatement = 222,
|
||||
WhileStatement = 223,
|
||||
ForStatement = 224,
|
||||
ForInStatement = 225,
|
||||
ForOfStatement = 226,
|
||||
ContinueStatement = 227,
|
||||
BreakStatement = 228,
|
||||
ReturnStatement = 229,
|
||||
WithStatement = 230,
|
||||
SwitchStatement = 231,
|
||||
LabeledStatement = 232,
|
||||
ThrowStatement = 233,
|
||||
TryStatement = 234,
|
||||
DebuggerStatement = 235,
|
||||
VariableDeclaration = 236,
|
||||
VariableDeclarationList = 237,
|
||||
FunctionDeclaration = 238,
|
||||
ClassDeclaration = 239,
|
||||
InterfaceDeclaration = 240,
|
||||
TypeAliasDeclaration = 241,
|
||||
EnumDeclaration = 242,
|
||||
ModuleDeclaration = 243,
|
||||
ModuleBlock = 244,
|
||||
CaseBlock = 245,
|
||||
NamespaceExportDeclaration = 246,
|
||||
ImportEqualsDeclaration = 247,
|
||||
ImportDeclaration = 248,
|
||||
ImportClause = 249,
|
||||
NamespaceImport = 250,
|
||||
NamedImports = 251,
|
||||
ImportSpecifier = 252,
|
||||
ExportAssignment = 253,
|
||||
ExportDeclaration = 254,
|
||||
NamedExports = 255,
|
||||
ExportSpecifier = 256,
|
||||
MissingDeclaration = 257,
|
||||
ExternalModuleReference = 258,
|
||||
JsxElement = 259,
|
||||
JsxSelfClosingElement = 260,
|
||||
JsxOpeningElement = 261,
|
||||
JsxClosingElement = 262,
|
||||
JsxFragment = 263,
|
||||
JsxOpeningFragment = 264,
|
||||
JsxClosingFragment = 265,
|
||||
JsxAttribute = 266,
|
||||
JsxAttributes = 267,
|
||||
JsxSpreadAttribute = 268,
|
||||
JsxExpression = 269,
|
||||
CaseClause = 270,
|
||||
DefaultClause = 271,
|
||||
HeritageClause = 272,
|
||||
CatchClause = 273,
|
||||
PropertyAssignment = 274,
|
||||
ShorthandPropertyAssignment = 275,
|
||||
SpreadAssignment = 276,
|
||||
EnumMember = 277,
|
||||
SourceFile = 278,
|
||||
Bundle = 279,
|
||||
UnparsedSource = 280,
|
||||
InputFiles = 281,
|
||||
JSDocTypeExpression = 282,
|
||||
JSDocAllType = 283,
|
||||
JSDocUnknownType = 284,
|
||||
JSDocNullableType = 285,
|
||||
JSDocNonNullableType = 286,
|
||||
JSDocOptionalType = 287,
|
||||
JSDocFunctionType = 288,
|
||||
JSDocVariadicType = 289,
|
||||
JSDocComment = 290,
|
||||
JSDocTypeLiteral = 291,
|
||||
JSDocSignature = 292,
|
||||
JSDocTag = 293,
|
||||
JSDocAugmentsTag = 294,
|
||||
JSDocClassTag = 295,
|
||||
JSDocCallbackTag = 296,
|
||||
JSDocEnumTag = 297,
|
||||
JSDocParameterTag = 298,
|
||||
JSDocReturnTag = 299,
|
||||
JSDocThisTag = 300,
|
||||
JSDocTypeTag = 301,
|
||||
JSDocTemplateTag = 302,
|
||||
JSDocTypedefTag = 303,
|
||||
JSDocPropertyTag = 304,
|
||||
SyntaxList = 305,
|
||||
NotEmittedStatement = 306,
|
||||
PartiallyEmittedExpression = 307,
|
||||
CommaListExpression = 308,
|
||||
MergeDeclarationMarker = 309,
|
||||
EndOfDeclarationMarker = 310,
|
||||
Count = 311,
|
||||
FirstAssignment = 58,
|
||||
LastAssignment = 70,
|
||||
FirstCompoundAssignment = 59,
|
||||
@ -394,15 +395,15 @@ declare namespace ts {
|
||||
FirstReservedWord = 72,
|
||||
LastReservedWord = 107,
|
||||
FirstKeyword = 72,
|
||||
LastKeyword = 145,
|
||||
LastKeyword = 146,
|
||||
FirstFutureReservedWord = 108,
|
||||
LastFutureReservedWord = 116,
|
||||
FirstTypeNode = 161,
|
||||
LastTypeNode = 181,
|
||||
FirstTypeNode = 162,
|
||||
LastTypeNode = 182,
|
||||
FirstPunctuation = 17,
|
||||
LastPunctuation = 70,
|
||||
FirstToken = 0,
|
||||
LastToken = 145,
|
||||
LastToken = 146,
|
||||
FirstTriviaToken = 2,
|
||||
LastTriviaToken = 7,
|
||||
FirstLiteralToken = 8,
|
||||
@ -411,11 +412,11 @@ declare namespace ts {
|
||||
LastTemplateToken = 16,
|
||||
FirstBinaryOperator = 27,
|
||||
LastBinaryOperator = 70,
|
||||
FirstNode = 146,
|
||||
FirstJSDocNode = 281,
|
||||
LastJSDocNode = 303,
|
||||
FirstJSDocTagNode = 292,
|
||||
LastJSDocTagNode = 303
|
||||
FirstNode = 147,
|
||||
FirstJSDocNode = 282,
|
||||
LastJSDocNode = 304,
|
||||
FirstJSDocTagNode = 293,
|
||||
LastJSDocTagNode = 304
|
||||
}
|
||||
enum NodeFlags {
|
||||
None = 0,
|
||||
@ -727,7 +728,7 @@ declare namespace ts {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface KeywordTypeNode extends TypeNode {
|
||||
kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
|
||||
kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
|
||||
}
|
||||
interface ImportTypeNode extends NodeWithTypeArguments {
|
||||
kind: SyntaxKind.ImportType;
|
||||
@ -2164,44 +2165,47 @@ declare namespace ts {
|
||||
Number = 8,
|
||||
Boolean = 16,
|
||||
Enum = 32,
|
||||
StringLiteral = 64,
|
||||
NumberLiteral = 128,
|
||||
BooleanLiteral = 256,
|
||||
EnumLiteral = 512,
|
||||
ESSymbol = 1024,
|
||||
UniqueESSymbol = 2048,
|
||||
Void = 4096,
|
||||
Undefined = 8192,
|
||||
Null = 16384,
|
||||
Never = 32768,
|
||||
TypeParameter = 65536,
|
||||
Object = 131072,
|
||||
Union = 262144,
|
||||
Intersection = 524288,
|
||||
Index = 1048576,
|
||||
IndexedAccess = 2097152,
|
||||
Conditional = 4194304,
|
||||
Substitution = 8388608,
|
||||
NonPrimitive = 16777216,
|
||||
Literal = 448,
|
||||
Unit = 27072,
|
||||
StringOrNumberLiteral = 192,
|
||||
PossiblyFalsy = 29148,
|
||||
StringLike = 68,
|
||||
NumberLike = 168,
|
||||
BooleanLike = 272,
|
||||
EnumLike = 544,
|
||||
ESSymbolLike = 3072,
|
||||
VoidLike = 12288,
|
||||
UnionOrIntersection = 786432,
|
||||
StructuredType = 917504,
|
||||
TypeVariable = 2162688,
|
||||
InstantiableNonPrimitive = 14745600,
|
||||
InstantiablePrimitive = 1048576,
|
||||
Instantiable = 15794176,
|
||||
StructuredOrInstantiable = 16711680,
|
||||
Narrowable = 33492479,
|
||||
NotUnionOrUnit = 16909315
|
||||
BigInt = 64,
|
||||
StringLiteral = 128,
|
||||
NumberLiteral = 256,
|
||||
BooleanLiteral = 512,
|
||||
EnumLiteral = 1024,
|
||||
BigIntLiteral = 2048,
|
||||
ESSymbol = 4096,
|
||||
UniqueESSymbol = 8192,
|
||||
Void = 16384,
|
||||
Undefined = 32768,
|
||||
Null = 65536,
|
||||
Never = 131072,
|
||||
TypeParameter = 262144,
|
||||
Object = 524288,
|
||||
Union = 1048576,
|
||||
Intersection = 2097152,
|
||||
Index = 4194304,
|
||||
IndexedAccess = 8388608,
|
||||
Conditional = 16777216,
|
||||
Substitution = 33554432,
|
||||
NonPrimitive = 67108864,
|
||||
Literal = 2944,
|
||||
Unit = 109440,
|
||||
StringOrNumberLiteral = 384,
|
||||
PossiblyFalsy = 117724,
|
||||
StringLike = 132,
|
||||
NumberLike = 296,
|
||||
BigIntLike = 2112,
|
||||
BooleanLike = 528,
|
||||
EnumLike = 1056,
|
||||
ESSymbolLike = 12288,
|
||||
VoidLike = 49152,
|
||||
UnionOrIntersection = 3145728,
|
||||
StructuredType = 3670016,
|
||||
TypeVariable = 8650752,
|
||||
InstantiableNonPrimitive = 58982400,
|
||||
InstantiablePrimitive = 4194304,
|
||||
Instantiable = 63176704,
|
||||
StructuredOrInstantiable = 66846720,
|
||||
Narrowable = 133970943,
|
||||
NotUnionOrUnit = 67637251
|
||||
}
|
||||
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
interface Type {
|
||||
@ -2212,7 +2216,7 @@ declare namespace ts {
|
||||
aliasTypeArguments?: ReadonlyArray<Type>;
|
||||
}
|
||||
interface LiteralType extends Type {
|
||||
value: string | number;
|
||||
value: string | number | PseudoBigInt;
|
||||
freshType: LiteralType;
|
||||
regularType: LiteralType;
|
||||
}
|
||||
@ -2225,6 +2229,9 @@ declare namespace ts {
|
||||
interface NumberLiteralType extends LiteralType {
|
||||
value: number;
|
||||
}
|
||||
interface BigIntLiteralType extends LiteralType {
|
||||
value: PseudoBigInt;
|
||||
}
|
||||
interface EnumType extends Type {
|
||||
}
|
||||
enum ObjectFlags {
|
||||
@ -3657,9 +3664,9 @@ declare namespace ts {
|
||||
function createNodeArray<T extends Node>(elements?: ReadonlyArray<T>, hasTrailingComma?: boolean): NodeArray<T>;
|
||||
/** If a node is passed, creates a string literal whose source text is read from a source node during emit. */
|
||||
function createLiteral(value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
|
||||
function createLiteral(value: number): NumericLiteral;
|
||||
function createLiteral(value: number | PseudoBigInt): NumericLiteral;
|
||||
function createLiteral(value: boolean): BooleanLiteral;
|
||||
function createLiteral(value: string | number | boolean): PrimaryExpression;
|
||||
function createLiteral(value: string | number | PseudoBigInt | boolean): PrimaryExpression;
|
||||
function createNumericLiteral(value: string): NumericLiteral;
|
||||
function createStringLiteral(text: string): StringLiteral;
|
||||
function createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user