typescript 5.0.4 → 5.1.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,14 @@ declare namespace ts {
79
79
  readonly kind: EventEndInstallTypes;
80
80
  readonly installSuccess: boolean;
81
81
  }
82
+ interface InstallTypingHost extends JsTyping.TypingResolutionHost {
83
+ useCaseSensitiveFileNames: boolean;
84
+ writeFile(path: string, content: string): void;
85
+ createDirectory(path: string): void;
86
+ getCurrentDirectory?(): string;
87
+ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
88
+ watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
89
+ }
82
90
  interface SetTypings extends ProjectResponse {
83
91
  readonly typeAcquisition: TypeAcquisition;
84
92
  readonly compilerOptions: CompilerOptions;
@@ -89,6 +97,7 @@ declare namespace ts {
89
97
  namespace protocol {
90
98
  enum CommandTypes {
91
99
  JsxClosingTag = "jsxClosingTag",
100
+ LinkedEditingRange = "linkedEditingRange",
92
101
  Brace = "brace",
93
102
  BraceCompletion = "braceCompletion",
94
103
  GetSpanOfEnclosingComment = "getSpanOfEnclosingComment",
@@ -117,8 +126,6 @@ declare namespace ts {
117
126
  Navto = "navto",
118
127
  NavTree = "navtree",
119
128
  NavTreeFull = "navtree-full",
120
- /** @deprecated */
121
- Occurrences = "occurrences",
122
129
  DocumentHighlights = "documentHighlights",
123
130
  Open = "open",
124
131
  Quickinfo = "quickinfo",
@@ -879,29 +886,15 @@ declare namespace ts {
879
886
  interface JsxClosingTagResponse extends Response {
880
887
  readonly body: TextInsertion;
881
888
  }
882
- /**
883
- * @deprecated
884
- * Get occurrences request; value of command field is
885
- * "occurrences". Return response giving spans that are relevant
886
- * in the file at a given line and column.
887
- */
888
- interface OccurrencesRequest extends FileLocationRequest {
889
- command: CommandTypes.Occurrences;
889
+ interface LinkedEditingRangeRequest extends FileLocationRequest {
890
+ readonly command: CommandTypes.LinkedEditingRange;
890
891
  }
891
- /** @deprecated */
892
- interface OccurrencesResponseItem extends FileSpanWithContext {
893
- /**
894
- * True if the occurrence is a write location, false otherwise.
895
- */
896
- isWriteAccess: boolean;
897
- /**
898
- * True if the occurrence is in a string, undefined otherwise;
899
- */
900
- isInString?: true;
892
+ interface LinkedEditingRangesBody {
893
+ ranges: TextSpan[];
894
+ wordPattern?: string;
901
895
  }
902
- /** @deprecated */
903
- interface OccurrencesResponse extends Response {
904
- body?: OccurrencesResponseItem[];
896
+ interface LinkedEditingRangeResponse extends Response {
897
+ readonly body: LinkedEditingRangesBody;
905
898
  }
906
899
  /**
907
900
  * Get document highlights request; value of command field is
@@ -2725,6 +2718,7 @@ declare namespace ts {
2725
2718
  placeOpenBraceOnNewLineForControlBlocks?: boolean;
2726
2719
  insertSpaceBeforeTypeAnnotation?: boolean;
2727
2720
  semicolons?: SemicolonPreference;
2721
+ indentSwitchCase?: boolean;
2728
2722
  }
2729
2723
  interface UserPreferences {
2730
2724
  readonly disableSuggestions?: boolean;
@@ -2991,6 +2985,54 @@ declare namespace ts {
2991
2985
  bigintLiteral = 25
2992
2986
  }
2993
2987
  }
2988
+ namespace typingsInstaller {
2989
+ interface Log {
2990
+ isEnabled(): boolean;
2991
+ writeLine(text: string): void;
2992
+ }
2993
+ type RequestCompletedAction = (success: boolean) => void;
2994
+ interface PendingRequest {
2995
+ requestId: number;
2996
+ packageNames: string[];
2997
+ cwd: string;
2998
+ onRequestCompleted: RequestCompletedAction;
2999
+ }
3000
+ abstract class TypingsInstaller {
3001
+ protected readonly installTypingHost: InstallTypingHost;
3002
+ private readonly globalCachePath;
3003
+ private readonly safeListPath;
3004
+ private readonly typesMapLocation;
3005
+ private readonly throttleLimit;
3006
+ protected readonly log: Log;
3007
+ private readonly packageNameToTypingLocation;
3008
+ private readonly missingTypingsSet;
3009
+ private readonly knownCachesSet;
3010
+ private readonly projectWatchers;
3011
+ private safeList;
3012
+ private readonly toCanonicalFileName;
3013
+ private readonly globalCachePackageJsonPath;
3014
+ private installRunCount;
3015
+ private inFlightRequestCount;
3016
+ abstract readonly typesRegistry: Map<string, MapLike<string>>;
3017
+ constructor(installTypingHost: InstallTypingHost, globalCachePath: string, safeListPath: Path, typesMapLocation: Path, throttleLimit: number, log?: Log);
3018
+ closeProject(req: CloseProject): void;
3019
+ private closeWatchers;
3020
+ install(req: DiscoverTypings): void;
3021
+ private initializeSafeList;
3022
+ private processCacheLocation;
3023
+ private filterTypings;
3024
+ protected ensurePackageDirectoryExists(directory: string): void;
3025
+ private installTypings;
3026
+ private ensureDirectoryExists;
3027
+ private watchFiles;
3028
+ private createSetTypings;
3029
+ private installTypingsAsync;
3030
+ private executeWithThrottling;
3031
+ protected abstract installWorker(requestId: number, packageNames: string[], cwd: string, onRequestCompleted: RequestCompletedAction): void;
3032
+ protected abstract sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes): void;
3033
+ protected readonly latestDistTag = "latest";
3034
+ }
3035
+ }
2994
3036
  interface CompressedData {
2995
3037
  length: number;
2996
3038
  compressionKind: string;
@@ -3065,10 +3107,6 @@ declare namespace ts {
3065
3107
  remove(path: NormalizedPath): void;
3066
3108
  }
3067
3109
  function isDynamicFileName(fileName: NormalizedPath): boolean;
3068
- interface ScriptInfoVersion {
3069
- svc: number;
3070
- text: number;
3071
- }
3072
3110
  class ScriptInfo {
3073
3111
  private readonly host;
3074
3112
  readonly fileName: NormalizedPath;
@@ -3081,10 +3119,9 @@ declare namespace ts {
3081
3119
  readonly containingProjects: Project[];
3082
3120
  private formatSettings;
3083
3121
  private preferences;
3084
- private textStorage;
3085
- constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: ScriptInfoVersion);
3122
+ constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: number);
3086
3123
  isScriptOpen(): boolean;
3087
- open(newText: string): void;
3124
+ open(newText: string | undefined): void;
3088
3125
  close(fileExists?: boolean): void;
3089
3126
  getSnapshot(): IScriptSnapshot;
3090
3127
  private ensureRealPath;
@@ -3874,11 +3911,11 @@ declare namespace ts {
3874
3911
  private getTypeDefinition;
3875
3912
  private mapImplementationLocations;
3876
3913
  private getImplementation;
3877
- private getOccurrences;
3878
3914
  private getSyntacticDiagnosticsSync;
3879
3915
  private getSemanticDiagnosticsSync;
3880
3916
  private getSuggestionDiagnosticsSync;
3881
3917
  private getJsxClosingTag;
3918
+ private getLinkedEditingRange;
3882
3919
  private getDocumentHighlights;
3883
3920
  private provideInlayHints;
3884
3921
  private setCompilerOptionsForInferredProjects;
@@ -3989,7 +4026,7 @@ declare namespace ts {
3989
4026
  responseRequired?: boolean;
3990
4027
  }
3991
4028
  }
3992
- const versionMajorMinor = "5.0";
4029
+ const versionMajorMinor = "5.1";
3993
4030
  /** The version of the TypeScript compiler release */
3994
4031
  const version: string;
3995
4032
  /**
@@ -4026,395 +4063,397 @@ declare namespace ts {
4026
4063
  WhitespaceTrivia = 5,
4027
4064
  ShebangTrivia = 6,
4028
4065
  ConflictMarkerTrivia = 7,
4029
- NumericLiteral = 8,
4030
- BigIntLiteral = 9,
4031
- StringLiteral = 10,
4032
- JsxText = 11,
4033
- JsxTextAllWhiteSpaces = 12,
4034
- RegularExpressionLiteral = 13,
4035
- NoSubstitutionTemplateLiteral = 14,
4036
- TemplateHead = 15,
4037
- TemplateMiddle = 16,
4038
- TemplateTail = 17,
4039
- OpenBraceToken = 18,
4040
- CloseBraceToken = 19,
4041
- OpenParenToken = 20,
4042
- CloseParenToken = 21,
4043
- OpenBracketToken = 22,
4044
- CloseBracketToken = 23,
4045
- DotToken = 24,
4046
- DotDotDotToken = 25,
4047
- SemicolonToken = 26,
4048
- CommaToken = 27,
4049
- QuestionDotToken = 28,
4050
- LessThanToken = 29,
4051
- LessThanSlashToken = 30,
4052
- GreaterThanToken = 31,
4053
- LessThanEqualsToken = 32,
4054
- GreaterThanEqualsToken = 33,
4055
- EqualsEqualsToken = 34,
4056
- ExclamationEqualsToken = 35,
4057
- EqualsEqualsEqualsToken = 36,
4058
- ExclamationEqualsEqualsToken = 37,
4059
- EqualsGreaterThanToken = 38,
4060
- PlusToken = 39,
4061
- MinusToken = 40,
4062
- AsteriskToken = 41,
4063
- AsteriskAsteriskToken = 42,
4064
- SlashToken = 43,
4065
- PercentToken = 44,
4066
- PlusPlusToken = 45,
4067
- MinusMinusToken = 46,
4068
- LessThanLessThanToken = 47,
4069
- GreaterThanGreaterThanToken = 48,
4070
- GreaterThanGreaterThanGreaterThanToken = 49,
4071
- AmpersandToken = 50,
4072
- BarToken = 51,
4073
- CaretToken = 52,
4074
- ExclamationToken = 53,
4075
- TildeToken = 54,
4076
- AmpersandAmpersandToken = 55,
4077
- BarBarToken = 56,
4078
- QuestionToken = 57,
4079
- ColonToken = 58,
4080
- AtToken = 59,
4081
- QuestionQuestionToken = 60,
4066
+ NonTextFileMarkerTrivia = 8,
4067
+ NumericLiteral = 9,
4068
+ BigIntLiteral = 10,
4069
+ StringLiteral = 11,
4070
+ JsxText = 12,
4071
+ JsxTextAllWhiteSpaces = 13,
4072
+ RegularExpressionLiteral = 14,
4073
+ NoSubstitutionTemplateLiteral = 15,
4074
+ TemplateHead = 16,
4075
+ TemplateMiddle = 17,
4076
+ TemplateTail = 18,
4077
+ OpenBraceToken = 19,
4078
+ CloseBraceToken = 20,
4079
+ OpenParenToken = 21,
4080
+ CloseParenToken = 22,
4081
+ OpenBracketToken = 23,
4082
+ CloseBracketToken = 24,
4083
+ DotToken = 25,
4084
+ DotDotDotToken = 26,
4085
+ SemicolonToken = 27,
4086
+ CommaToken = 28,
4087
+ QuestionDotToken = 29,
4088
+ LessThanToken = 30,
4089
+ LessThanSlashToken = 31,
4090
+ GreaterThanToken = 32,
4091
+ LessThanEqualsToken = 33,
4092
+ GreaterThanEqualsToken = 34,
4093
+ EqualsEqualsToken = 35,
4094
+ ExclamationEqualsToken = 36,
4095
+ EqualsEqualsEqualsToken = 37,
4096
+ ExclamationEqualsEqualsToken = 38,
4097
+ EqualsGreaterThanToken = 39,
4098
+ PlusToken = 40,
4099
+ MinusToken = 41,
4100
+ AsteriskToken = 42,
4101
+ AsteriskAsteriskToken = 43,
4102
+ SlashToken = 44,
4103
+ PercentToken = 45,
4104
+ PlusPlusToken = 46,
4105
+ MinusMinusToken = 47,
4106
+ LessThanLessThanToken = 48,
4107
+ GreaterThanGreaterThanToken = 49,
4108
+ GreaterThanGreaterThanGreaterThanToken = 50,
4109
+ AmpersandToken = 51,
4110
+ BarToken = 52,
4111
+ CaretToken = 53,
4112
+ ExclamationToken = 54,
4113
+ TildeToken = 55,
4114
+ AmpersandAmpersandToken = 56,
4115
+ BarBarToken = 57,
4116
+ QuestionToken = 58,
4117
+ ColonToken = 59,
4118
+ AtToken = 60,
4119
+ QuestionQuestionToken = 61,
4082
4120
  /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
4083
- BacktickToken = 61,
4121
+ BacktickToken = 62,
4084
4122
  /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */
4085
- HashToken = 62,
4086
- EqualsToken = 63,
4087
- PlusEqualsToken = 64,
4088
- MinusEqualsToken = 65,
4089
- AsteriskEqualsToken = 66,
4090
- AsteriskAsteriskEqualsToken = 67,
4091
- SlashEqualsToken = 68,
4092
- PercentEqualsToken = 69,
4093
- LessThanLessThanEqualsToken = 70,
4094
- GreaterThanGreaterThanEqualsToken = 71,
4095
- GreaterThanGreaterThanGreaterThanEqualsToken = 72,
4096
- AmpersandEqualsToken = 73,
4097
- BarEqualsToken = 74,
4098
- BarBarEqualsToken = 75,
4099
- AmpersandAmpersandEqualsToken = 76,
4100
- QuestionQuestionEqualsToken = 77,
4101
- CaretEqualsToken = 78,
4102
- Identifier = 79,
4103
- PrivateIdentifier = 80,
4104
- BreakKeyword = 81,
4105
- CaseKeyword = 82,
4106
- CatchKeyword = 83,
4107
- ClassKeyword = 84,
4108
- ConstKeyword = 85,
4109
- ContinueKeyword = 86,
4110
- DebuggerKeyword = 87,
4111
- DefaultKeyword = 88,
4112
- DeleteKeyword = 89,
4113
- DoKeyword = 90,
4114
- ElseKeyword = 91,
4115
- EnumKeyword = 92,
4116
- ExportKeyword = 93,
4117
- ExtendsKeyword = 94,
4118
- FalseKeyword = 95,
4119
- FinallyKeyword = 96,
4120
- ForKeyword = 97,
4121
- FunctionKeyword = 98,
4122
- IfKeyword = 99,
4123
- ImportKeyword = 100,
4124
- InKeyword = 101,
4125
- InstanceOfKeyword = 102,
4126
- NewKeyword = 103,
4127
- NullKeyword = 104,
4128
- ReturnKeyword = 105,
4129
- SuperKeyword = 106,
4130
- SwitchKeyword = 107,
4131
- ThisKeyword = 108,
4132
- ThrowKeyword = 109,
4133
- TrueKeyword = 110,
4134
- TryKeyword = 111,
4135
- TypeOfKeyword = 112,
4136
- VarKeyword = 113,
4137
- VoidKeyword = 114,
4138
- WhileKeyword = 115,
4139
- WithKeyword = 116,
4140
- ImplementsKeyword = 117,
4141
- InterfaceKeyword = 118,
4142
- LetKeyword = 119,
4143
- PackageKeyword = 120,
4144
- PrivateKeyword = 121,
4145
- ProtectedKeyword = 122,
4146
- PublicKeyword = 123,
4147
- StaticKeyword = 124,
4148
- YieldKeyword = 125,
4149
- AbstractKeyword = 126,
4150
- AccessorKeyword = 127,
4151
- AsKeyword = 128,
4152
- AssertsKeyword = 129,
4153
- AssertKeyword = 130,
4154
- AnyKeyword = 131,
4155
- AsyncKeyword = 132,
4156
- AwaitKeyword = 133,
4157
- BooleanKeyword = 134,
4158
- ConstructorKeyword = 135,
4159
- DeclareKeyword = 136,
4160
- GetKeyword = 137,
4161
- InferKeyword = 138,
4162
- IntrinsicKeyword = 139,
4163
- IsKeyword = 140,
4164
- KeyOfKeyword = 141,
4165
- ModuleKeyword = 142,
4166
- NamespaceKeyword = 143,
4167
- NeverKeyword = 144,
4168
- OutKeyword = 145,
4169
- ReadonlyKeyword = 146,
4170
- RequireKeyword = 147,
4171
- NumberKeyword = 148,
4172
- ObjectKeyword = 149,
4173
- SatisfiesKeyword = 150,
4174
- SetKeyword = 151,
4175
- StringKeyword = 152,
4176
- SymbolKeyword = 153,
4177
- TypeKeyword = 154,
4178
- UndefinedKeyword = 155,
4179
- UniqueKeyword = 156,
4180
- UnknownKeyword = 157,
4181
- FromKeyword = 158,
4182
- GlobalKeyword = 159,
4183
- BigIntKeyword = 160,
4184
- OverrideKeyword = 161,
4185
- OfKeyword = 162,
4186
- QualifiedName = 163,
4187
- ComputedPropertyName = 164,
4188
- TypeParameter = 165,
4189
- Parameter = 166,
4190
- Decorator = 167,
4191
- PropertySignature = 168,
4192
- PropertyDeclaration = 169,
4193
- MethodSignature = 170,
4194
- MethodDeclaration = 171,
4195
- ClassStaticBlockDeclaration = 172,
4196
- Constructor = 173,
4197
- GetAccessor = 174,
4198
- SetAccessor = 175,
4199
- CallSignature = 176,
4200
- ConstructSignature = 177,
4201
- IndexSignature = 178,
4202
- TypePredicate = 179,
4203
- TypeReference = 180,
4204
- FunctionType = 181,
4205
- ConstructorType = 182,
4206
- TypeQuery = 183,
4207
- TypeLiteral = 184,
4208
- ArrayType = 185,
4209
- TupleType = 186,
4210
- OptionalType = 187,
4211
- RestType = 188,
4212
- UnionType = 189,
4213
- IntersectionType = 190,
4214
- ConditionalType = 191,
4215
- InferType = 192,
4216
- ParenthesizedType = 193,
4217
- ThisType = 194,
4218
- TypeOperator = 195,
4219
- IndexedAccessType = 196,
4220
- MappedType = 197,
4221
- LiteralType = 198,
4222
- NamedTupleMember = 199,
4223
- TemplateLiteralType = 200,
4224
- TemplateLiteralTypeSpan = 201,
4225
- ImportType = 202,
4226
- ObjectBindingPattern = 203,
4227
- ArrayBindingPattern = 204,
4228
- BindingElement = 205,
4229
- ArrayLiteralExpression = 206,
4230
- ObjectLiteralExpression = 207,
4231
- PropertyAccessExpression = 208,
4232
- ElementAccessExpression = 209,
4233
- CallExpression = 210,
4234
- NewExpression = 211,
4235
- TaggedTemplateExpression = 212,
4236
- TypeAssertionExpression = 213,
4237
- ParenthesizedExpression = 214,
4238
- FunctionExpression = 215,
4239
- ArrowFunction = 216,
4240
- DeleteExpression = 217,
4241
- TypeOfExpression = 218,
4242
- VoidExpression = 219,
4243
- AwaitExpression = 220,
4244
- PrefixUnaryExpression = 221,
4245
- PostfixUnaryExpression = 222,
4246
- BinaryExpression = 223,
4247
- ConditionalExpression = 224,
4248
- TemplateExpression = 225,
4249
- YieldExpression = 226,
4250
- SpreadElement = 227,
4251
- ClassExpression = 228,
4252
- OmittedExpression = 229,
4253
- ExpressionWithTypeArguments = 230,
4254
- AsExpression = 231,
4255
- NonNullExpression = 232,
4256
- MetaProperty = 233,
4257
- SyntheticExpression = 234,
4258
- SatisfiesExpression = 235,
4259
- TemplateSpan = 236,
4260
- SemicolonClassElement = 237,
4261
- Block = 238,
4262
- EmptyStatement = 239,
4263
- VariableStatement = 240,
4264
- ExpressionStatement = 241,
4265
- IfStatement = 242,
4266
- DoStatement = 243,
4267
- WhileStatement = 244,
4268
- ForStatement = 245,
4269
- ForInStatement = 246,
4270
- ForOfStatement = 247,
4271
- ContinueStatement = 248,
4272
- BreakStatement = 249,
4273
- ReturnStatement = 250,
4274
- WithStatement = 251,
4275
- SwitchStatement = 252,
4276
- LabeledStatement = 253,
4277
- ThrowStatement = 254,
4278
- TryStatement = 255,
4279
- DebuggerStatement = 256,
4280
- VariableDeclaration = 257,
4281
- VariableDeclarationList = 258,
4282
- FunctionDeclaration = 259,
4283
- ClassDeclaration = 260,
4284
- InterfaceDeclaration = 261,
4285
- TypeAliasDeclaration = 262,
4286
- EnumDeclaration = 263,
4287
- ModuleDeclaration = 264,
4288
- ModuleBlock = 265,
4289
- CaseBlock = 266,
4290
- NamespaceExportDeclaration = 267,
4291
- ImportEqualsDeclaration = 268,
4292
- ImportDeclaration = 269,
4293
- ImportClause = 270,
4294
- NamespaceImport = 271,
4295
- NamedImports = 272,
4296
- ImportSpecifier = 273,
4297
- ExportAssignment = 274,
4298
- ExportDeclaration = 275,
4299
- NamedExports = 276,
4300
- NamespaceExport = 277,
4301
- ExportSpecifier = 278,
4302
- MissingDeclaration = 279,
4303
- ExternalModuleReference = 280,
4304
- JsxElement = 281,
4305
- JsxSelfClosingElement = 282,
4306
- JsxOpeningElement = 283,
4307
- JsxClosingElement = 284,
4308
- JsxFragment = 285,
4309
- JsxOpeningFragment = 286,
4310
- JsxClosingFragment = 287,
4311
- JsxAttribute = 288,
4312
- JsxAttributes = 289,
4313
- JsxSpreadAttribute = 290,
4314
- JsxExpression = 291,
4315
- CaseClause = 292,
4316
- DefaultClause = 293,
4317
- HeritageClause = 294,
4318
- CatchClause = 295,
4319
- AssertClause = 296,
4320
- AssertEntry = 297,
4321
- ImportTypeAssertionContainer = 298,
4322
- PropertyAssignment = 299,
4323
- ShorthandPropertyAssignment = 300,
4324
- SpreadAssignment = 301,
4325
- EnumMember = 302,
4326
- /** @deprecated */ UnparsedPrologue = 303,
4327
- /** @deprecated */ UnparsedPrepend = 304,
4328
- /** @deprecated */ UnparsedText = 305,
4329
- /** @deprecated */ UnparsedInternalText = 306,
4330
- /** @deprecated */ UnparsedSyntheticReference = 307,
4331
- SourceFile = 308,
4332
- Bundle = 309,
4333
- /** @deprecated */ UnparsedSource = 310,
4334
- /** @deprecated */ InputFiles = 311,
4335
- JSDocTypeExpression = 312,
4336
- JSDocNameReference = 313,
4337
- JSDocMemberName = 314,
4338
- JSDocAllType = 315,
4339
- JSDocUnknownType = 316,
4340
- JSDocNullableType = 317,
4341
- JSDocNonNullableType = 318,
4342
- JSDocOptionalType = 319,
4343
- JSDocFunctionType = 320,
4344
- JSDocVariadicType = 321,
4345
- JSDocNamepathType = 322,
4346
- JSDoc = 323,
4123
+ HashToken = 63,
4124
+ EqualsToken = 64,
4125
+ PlusEqualsToken = 65,
4126
+ MinusEqualsToken = 66,
4127
+ AsteriskEqualsToken = 67,
4128
+ AsteriskAsteriskEqualsToken = 68,
4129
+ SlashEqualsToken = 69,
4130
+ PercentEqualsToken = 70,
4131
+ LessThanLessThanEqualsToken = 71,
4132
+ GreaterThanGreaterThanEqualsToken = 72,
4133
+ GreaterThanGreaterThanGreaterThanEqualsToken = 73,
4134
+ AmpersandEqualsToken = 74,
4135
+ BarEqualsToken = 75,
4136
+ BarBarEqualsToken = 76,
4137
+ AmpersandAmpersandEqualsToken = 77,
4138
+ QuestionQuestionEqualsToken = 78,
4139
+ CaretEqualsToken = 79,
4140
+ Identifier = 80,
4141
+ PrivateIdentifier = 81,
4142
+ BreakKeyword = 83,
4143
+ CaseKeyword = 84,
4144
+ CatchKeyword = 85,
4145
+ ClassKeyword = 86,
4146
+ ConstKeyword = 87,
4147
+ ContinueKeyword = 88,
4148
+ DebuggerKeyword = 89,
4149
+ DefaultKeyword = 90,
4150
+ DeleteKeyword = 91,
4151
+ DoKeyword = 92,
4152
+ ElseKeyword = 93,
4153
+ EnumKeyword = 94,
4154
+ ExportKeyword = 95,
4155
+ ExtendsKeyword = 96,
4156
+ FalseKeyword = 97,
4157
+ FinallyKeyword = 98,
4158
+ ForKeyword = 99,
4159
+ FunctionKeyword = 100,
4160
+ IfKeyword = 101,
4161
+ ImportKeyword = 102,
4162
+ InKeyword = 103,
4163
+ InstanceOfKeyword = 104,
4164
+ NewKeyword = 105,
4165
+ NullKeyword = 106,
4166
+ ReturnKeyword = 107,
4167
+ SuperKeyword = 108,
4168
+ SwitchKeyword = 109,
4169
+ ThisKeyword = 110,
4170
+ ThrowKeyword = 111,
4171
+ TrueKeyword = 112,
4172
+ TryKeyword = 113,
4173
+ TypeOfKeyword = 114,
4174
+ VarKeyword = 115,
4175
+ VoidKeyword = 116,
4176
+ WhileKeyword = 117,
4177
+ WithKeyword = 118,
4178
+ ImplementsKeyword = 119,
4179
+ InterfaceKeyword = 120,
4180
+ LetKeyword = 121,
4181
+ PackageKeyword = 122,
4182
+ PrivateKeyword = 123,
4183
+ ProtectedKeyword = 124,
4184
+ PublicKeyword = 125,
4185
+ StaticKeyword = 126,
4186
+ YieldKeyword = 127,
4187
+ AbstractKeyword = 128,
4188
+ AccessorKeyword = 129,
4189
+ AsKeyword = 130,
4190
+ AssertsKeyword = 131,
4191
+ AssertKeyword = 132,
4192
+ AnyKeyword = 133,
4193
+ AsyncKeyword = 134,
4194
+ AwaitKeyword = 135,
4195
+ BooleanKeyword = 136,
4196
+ ConstructorKeyword = 137,
4197
+ DeclareKeyword = 138,
4198
+ GetKeyword = 139,
4199
+ InferKeyword = 140,
4200
+ IntrinsicKeyword = 141,
4201
+ IsKeyword = 142,
4202
+ KeyOfKeyword = 143,
4203
+ ModuleKeyword = 144,
4204
+ NamespaceKeyword = 145,
4205
+ NeverKeyword = 146,
4206
+ OutKeyword = 147,
4207
+ ReadonlyKeyword = 148,
4208
+ RequireKeyword = 149,
4209
+ NumberKeyword = 150,
4210
+ ObjectKeyword = 151,
4211
+ SatisfiesKeyword = 152,
4212
+ SetKeyword = 153,
4213
+ StringKeyword = 154,
4214
+ SymbolKeyword = 155,
4215
+ TypeKeyword = 156,
4216
+ UndefinedKeyword = 157,
4217
+ UniqueKeyword = 158,
4218
+ UnknownKeyword = 159,
4219
+ FromKeyword = 160,
4220
+ GlobalKeyword = 161,
4221
+ BigIntKeyword = 162,
4222
+ OverrideKeyword = 163,
4223
+ OfKeyword = 164,
4224
+ QualifiedName = 165,
4225
+ ComputedPropertyName = 166,
4226
+ TypeParameter = 167,
4227
+ Parameter = 168,
4228
+ Decorator = 169,
4229
+ PropertySignature = 170,
4230
+ PropertyDeclaration = 171,
4231
+ MethodSignature = 172,
4232
+ MethodDeclaration = 173,
4233
+ ClassStaticBlockDeclaration = 174,
4234
+ Constructor = 175,
4235
+ GetAccessor = 176,
4236
+ SetAccessor = 177,
4237
+ CallSignature = 178,
4238
+ ConstructSignature = 179,
4239
+ IndexSignature = 180,
4240
+ TypePredicate = 181,
4241
+ TypeReference = 182,
4242
+ FunctionType = 183,
4243
+ ConstructorType = 184,
4244
+ TypeQuery = 185,
4245
+ TypeLiteral = 186,
4246
+ ArrayType = 187,
4247
+ TupleType = 188,
4248
+ OptionalType = 189,
4249
+ RestType = 190,
4250
+ UnionType = 191,
4251
+ IntersectionType = 192,
4252
+ ConditionalType = 193,
4253
+ InferType = 194,
4254
+ ParenthesizedType = 195,
4255
+ ThisType = 196,
4256
+ TypeOperator = 197,
4257
+ IndexedAccessType = 198,
4258
+ MappedType = 199,
4259
+ LiteralType = 200,
4260
+ NamedTupleMember = 201,
4261
+ TemplateLiteralType = 202,
4262
+ TemplateLiteralTypeSpan = 203,
4263
+ ImportType = 204,
4264
+ ObjectBindingPattern = 205,
4265
+ ArrayBindingPattern = 206,
4266
+ BindingElement = 207,
4267
+ ArrayLiteralExpression = 208,
4268
+ ObjectLiteralExpression = 209,
4269
+ PropertyAccessExpression = 210,
4270
+ ElementAccessExpression = 211,
4271
+ CallExpression = 212,
4272
+ NewExpression = 213,
4273
+ TaggedTemplateExpression = 214,
4274
+ TypeAssertionExpression = 215,
4275
+ ParenthesizedExpression = 216,
4276
+ FunctionExpression = 217,
4277
+ ArrowFunction = 218,
4278
+ DeleteExpression = 219,
4279
+ TypeOfExpression = 220,
4280
+ VoidExpression = 221,
4281
+ AwaitExpression = 222,
4282
+ PrefixUnaryExpression = 223,
4283
+ PostfixUnaryExpression = 224,
4284
+ BinaryExpression = 225,
4285
+ ConditionalExpression = 226,
4286
+ TemplateExpression = 227,
4287
+ YieldExpression = 228,
4288
+ SpreadElement = 229,
4289
+ ClassExpression = 230,
4290
+ OmittedExpression = 231,
4291
+ ExpressionWithTypeArguments = 232,
4292
+ AsExpression = 233,
4293
+ NonNullExpression = 234,
4294
+ MetaProperty = 235,
4295
+ SyntheticExpression = 236,
4296
+ SatisfiesExpression = 237,
4297
+ TemplateSpan = 238,
4298
+ SemicolonClassElement = 239,
4299
+ Block = 240,
4300
+ EmptyStatement = 241,
4301
+ VariableStatement = 242,
4302
+ ExpressionStatement = 243,
4303
+ IfStatement = 244,
4304
+ DoStatement = 245,
4305
+ WhileStatement = 246,
4306
+ ForStatement = 247,
4307
+ ForInStatement = 248,
4308
+ ForOfStatement = 249,
4309
+ ContinueStatement = 250,
4310
+ BreakStatement = 251,
4311
+ ReturnStatement = 252,
4312
+ WithStatement = 253,
4313
+ SwitchStatement = 254,
4314
+ LabeledStatement = 255,
4315
+ ThrowStatement = 256,
4316
+ TryStatement = 257,
4317
+ DebuggerStatement = 258,
4318
+ VariableDeclaration = 259,
4319
+ VariableDeclarationList = 260,
4320
+ FunctionDeclaration = 261,
4321
+ ClassDeclaration = 262,
4322
+ InterfaceDeclaration = 263,
4323
+ TypeAliasDeclaration = 264,
4324
+ EnumDeclaration = 265,
4325
+ ModuleDeclaration = 266,
4326
+ ModuleBlock = 267,
4327
+ CaseBlock = 268,
4328
+ NamespaceExportDeclaration = 269,
4329
+ ImportEqualsDeclaration = 270,
4330
+ ImportDeclaration = 271,
4331
+ ImportClause = 272,
4332
+ NamespaceImport = 273,
4333
+ NamedImports = 274,
4334
+ ImportSpecifier = 275,
4335
+ ExportAssignment = 276,
4336
+ ExportDeclaration = 277,
4337
+ NamedExports = 278,
4338
+ NamespaceExport = 279,
4339
+ ExportSpecifier = 280,
4340
+ MissingDeclaration = 281,
4341
+ ExternalModuleReference = 282,
4342
+ JsxElement = 283,
4343
+ JsxSelfClosingElement = 284,
4344
+ JsxOpeningElement = 285,
4345
+ JsxClosingElement = 286,
4346
+ JsxFragment = 287,
4347
+ JsxOpeningFragment = 288,
4348
+ JsxClosingFragment = 289,
4349
+ JsxAttribute = 290,
4350
+ JsxAttributes = 291,
4351
+ JsxSpreadAttribute = 292,
4352
+ JsxExpression = 293,
4353
+ JsxNamespacedName = 294,
4354
+ CaseClause = 295,
4355
+ DefaultClause = 296,
4356
+ HeritageClause = 297,
4357
+ CatchClause = 298,
4358
+ AssertClause = 299,
4359
+ AssertEntry = 300,
4360
+ ImportTypeAssertionContainer = 301,
4361
+ PropertyAssignment = 302,
4362
+ ShorthandPropertyAssignment = 303,
4363
+ SpreadAssignment = 304,
4364
+ EnumMember = 305,
4365
+ /** @deprecated */ UnparsedPrologue = 306,
4366
+ /** @deprecated */ UnparsedPrepend = 307,
4367
+ /** @deprecated */ UnparsedText = 308,
4368
+ /** @deprecated */ UnparsedInternalText = 309,
4369
+ /** @deprecated */ UnparsedSyntheticReference = 310,
4370
+ SourceFile = 311,
4371
+ Bundle = 312,
4372
+ /** @deprecated */ UnparsedSource = 313,
4373
+ /** @deprecated */ InputFiles = 314,
4374
+ JSDocTypeExpression = 315,
4375
+ JSDocNameReference = 316,
4376
+ JSDocMemberName = 317,
4377
+ JSDocAllType = 318,
4378
+ JSDocUnknownType = 319,
4379
+ JSDocNullableType = 320,
4380
+ JSDocNonNullableType = 321,
4381
+ JSDocOptionalType = 322,
4382
+ JSDocFunctionType = 323,
4383
+ JSDocVariadicType = 324,
4384
+ JSDocNamepathType = 325,
4385
+ JSDoc = 326,
4347
4386
  /** @deprecated Use SyntaxKind.JSDoc */
4348
- JSDocComment = 323,
4349
- JSDocText = 324,
4350
- JSDocTypeLiteral = 325,
4351
- JSDocSignature = 326,
4352
- JSDocLink = 327,
4353
- JSDocLinkCode = 328,
4354
- JSDocLinkPlain = 329,
4355
- JSDocTag = 330,
4356
- JSDocAugmentsTag = 331,
4357
- JSDocImplementsTag = 332,
4358
- JSDocAuthorTag = 333,
4359
- JSDocDeprecatedTag = 334,
4360
- JSDocClassTag = 335,
4361
- JSDocPublicTag = 336,
4362
- JSDocPrivateTag = 337,
4363
- JSDocProtectedTag = 338,
4364
- JSDocReadonlyTag = 339,
4365
- JSDocOverrideTag = 340,
4366
- JSDocCallbackTag = 341,
4367
- JSDocOverloadTag = 342,
4368
- JSDocEnumTag = 343,
4369
- JSDocParameterTag = 344,
4370
- JSDocReturnTag = 345,
4371
- JSDocThisTag = 346,
4372
- JSDocTypeTag = 347,
4373
- JSDocTemplateTag = 348,
4374
- JSDocTypedefTag = 349,
4375
- JSDocSeeTag = 350,
4376
- JSDocPropertyTag = 351,
4377
- JSDocThrowsTag = 352,
4378
- JSDocSatisfiesTag = 353,
4379
- SyntaxList = 354,
4380
- NotEmittedStatement = 355,
4381
- PartiallyEmittedExpression = 356,
4382
- CommaListExpression = 357,
4383
- MergeDeclarationMarker = 358,
4384
- EndOfDeclarationMarker = 359,
4385
- SyntheticReferenceExpression = 360,
4386
- Count = 361,
4387
- FirstAssignment = 63,
4388
- LastAssignment = 78,
4389
- FirstCompoundAssignment = 64,
4390
- LastCompoundAssignment = 78,
4391
- FirstReservedWord = 81,
4392
- LastReservedWord = 116,
4393
- FirstKeyword = 81,
4394
- LastKeyword = 162,
4395
- FirstFutureReservedWord = 117,
4396
- LastFutureReservedWord = 125,
4397
- FirstTypeNode = 179,
4398
- LastTypeNode = 202,
4399
- FirstPunctuation = 18,
4400
- LastPunctuation = 78,
4387
+ JSDocComment = 326,
4388
+ JSDocText = 327,
4389
+ JSDocTypeLiteral = 328,
4390
+ JSDocSignature = 329,
4391
+ JSDocLink = 330,
4392
+ JSDocLinkCode = 331,
4393
+ JSDocLinkPlain = 332,
4394
+ JSDocTag = 333,
4395
+ JSDocAugmentsTag = 334,
4396
+ JSDocImplementsTag = 335,
4397
+ JSDocAuthorTag = 336,
4398
+ JSDocDeprecatedTag = 337,
4399
+ JSDocClassTag = 338,
4400
+ JSDocPublicTag = 339,
4401
+ JSDocPrivateTag = 340,
4402
+ JSDocProtectedTag = 341,
4403
+ JSDocReadonlyTag = 342,
4404
+ JSDocOverrideTag = 343,
4405
+ JSDocCallbackTag = 344,
4406
+ JSDocOverloadTag = 345,
4407
+ JSDocEnumTag = 346,
4408
+ JSDocParameterTag = 347,
4409
+ JSDocReturnTag = 348,
4410
+ JSDocThisTag = 349,
4411
+ JSDocTypeTag = 350,
4412
+ JSDocTemplateTag = 351,
4413
+ JSDocTypedefTag = 352,
4414
+ JSDocSeeTag = 353,
4415
+ JSDocPropertyTag = 354,
4416
+ JSDocThrowsTag = 355,
4417
+ JSDocSatisfiesTag = 356,
4418
+ SyntaxList = 357,
4419
+ NotEmittedStatement = 358,
4420
+ PartiallyEmittedExpression = 359,
4421
+ CommaListExpression = 360,
4422
+ MergeDeclarationMarker = 361,
4423
+ EndOfDeclarationMarker = 362,
4424
+ SyntheticReferenceExpression = 363,
4425
+ Count = 364,
4426
+ FirstAssignment = 64,
4427
+ LastAssignment = 79,
4428
+ FirstCompoundAssignment = 65,
4429
+ LastCompoundAssignment = 79,
4430
+ FirstReservedWord = 83,
4431
+ LastReservedWord = 118,
4432
+ FirstKeyword = 83,
4433
+ LastKeyword = 164,
4434
+ FirstFutureReservedWord = 119,
4435
+ LastFutureReservedWord = 127,
4436
+ FirstTypeNode = 181,
4437
+ LastTypeNode = 204,
4438
+ FirstPunctuation = 19,
4439
+ LastPunctuation = 79,
4401
4440
  FirstToken = 0,
4402
- LastToken = 162,
4441
+ LastToken = 164,
4403
4442
  FirstTriviaToken = 2,
4404
4443
  LastTriviaToken = 7,
4405
- FirstLiteralToken = 8,
4406
- LastLiteralToken = 14,
4407
- FirstTemplateToken = 14,
4408
- LastTemplateToken = 17,
4409
- FirstBinaryOperator = 29,
4410
- LastBinaryOperator = 78,
4411
- FirstStatement = 240,
4412
- LastStatement = 256,
4413
- FirstNode = 163,
4414
- FirstJSDocNode = 312,
4415
- LastJSDocNode = 353,
4416
- FirstJSDocTagNode = 330,
4417
- LastJSDocTagNode = 353
4444
+ FirstLiteralToken = 9,
4445
+ LastLiteralToken = 15,
4446
+ FirstTemplateToken = 15,
4447
+ LastTemplateToken = 18,
4448
+ FirstBinaryOperator = 30,
4449
+ LastBinaryOperator = 79,
4450
+ FirstStatement = 242,
4451
+ LastStatement = 258,
4452
+ FirstNode = 165,
4453
+ FirstJSDocNode = 315,
4454
+ LastJSDocNode = 356,
4455
+ FirstJSDocTagNode = 333,
4456
+ LastJSDocTagNode = 356
4418
4457
  }
4419
4458
  type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
4420
4459
  type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@@ -5322,14 +5361,21 @@ declare namespace ts {
5322
5361
  }
5323
5362
  type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
5324
5363
  type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
5325
- type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
5364
+ type JsxAttributeName = Identifier | JsxNamespacedName;
5365
+ type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName;
5326
5366
  interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
5327
5367
  readonly expression: JsxTagNameExpression;
5328
5368
  }
5329
- interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
5369
+ interface JsxAttributes extends PrimaryExpression, Declaration {
5370
+ readonly properties: NodeArray<JsxAttributeLike>;
5330
5371
  readonly kind: SyntaxKind.JsxAttributes;
5331
5372
  readonly parent: JsxOpeningLikeElement;
5332
5373
  }
5374
+ interface JsxNamespacedName extends PrimaryExpression {
5375
+ readonly kind: SyntaxKind.JsxNamespacedName;
5376
+ readonly name: Identifier;
5377
+ readonly namespace: Identifier;
5378
+ }
5333
5379
  interface JsxOpeningElement extends Expression {
5334
5380
  readonly kind: SyntaxKind.JsxOpeningElement;
5335
5381
  readonly parent: JsxElement;
@@ -5357,15 +5403,16 @@ declare namespace ts {
5357
5403
  readonly kind: SyntaxKind.JsxClosingFragment;
5358
5404
  readonly parent: JsxFragment;
5359
5405
  }
5360
- interface JsxAttribute extends ObjectLiteralElement {
5406
+ interface JsxAttribute extends Declaration {
5361
5407
  readonly kind: SyntaxKind.JsxAttribute;
5362
5408
  readonly parent: JsxAttributes;
5363
- readonly name: Identifier;
5409
+ readonly name: JsxAttributeName;
5364
5410
  readonly initializer?: JsxAttributeValue;
5365
5411
  }
5366
5412
  type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
5367
5413
  interface JsxSpreadAttribute extends ObjectLiteralElement {
5368
5414
  readonly kind: SyntaxKind.JsxSpreadAttribute;
5415
+ readonly name: PropertyName;
5369
5416
  readonly parent: JsxAttributes;
5370
5417
  readonly expression: Expression;
5371
5418
  }
@@ -6401,6 +6448,40 @@ declare namespace ts {
6401
6448
  getApparentType(type: Type): Type;
6402
6449
  getBaseConstraintOfType(type: Type): Type | undefined;
6403
6450
  getDefaultFromTypeParameter(type: Type): Type | undefined;
6451
+ /**
6452
+ * Gets the intrinsic `any` type. There are multiple types that act as `any` used internally in the compiler,
6453
+ * so the type returned by this function should not be used in equality checks to determine if another type
6454
+ * is `any`. Instead, use `type.flags & TypeFlags.Any`.
6455
+ */
6456
+ getAnyType(): Type;
6457
+ getStringType(): Type;
6458
+ getStringLiteralType(value: string): StringLiteralType;
6459
+ getNumberType(): Type;
6460
+ getNumberLiteralType(value: number): NumberLiteralType;
6461
+ getBigIntType(): Type;
6462
+ getBooleanType(): Type;
6463
+ getFalseType(): Type;
6464
+ getTrueType(): Type;
6465
+ getVoidType(): Type;
6466
+ /**
6467
+ * Gets the intrinsic `undefined` type. There are multiple types that act as `undefined` used internally in the compiler
6468
+ * depending on compiler options, so the type returned by this function should not be used in equality checks to determine
6469
+ * if another type is `undefined`. Instead, use `type.flags & TypeFlags.Undefined`.
6470
+ */
6471
+ getUndefinedType(): Type;
6472
+ /**
6473
+ * Gets the intrinsic `null` type. There are multiple types that act as `null` used internally in the compiler,
6474
+ * so the type returned by this function should not be used in equality checks to determine if another type
6475
+ * is `null`. Instead, use `type.flags & TypeFlags.Null`.
6476
+ */
6477
+ getNullType(): Type;
6478
+ getESSymbolType(): Type;
6479
+ /**
6480
+ * Gets the intrinsic `never` type. There are multiple types that act as `never` used internally in the compiler,
6481
+ * so the type returned by this function should not be used in equality checks to determine if another type
6482
+ * is `never`. Instead, use `type.flags & TypeFlags.Never`.
6483
+ */
6484
+ getNeverType(): Type;
6404
6485
  /**
6405
6486
  * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts.
6406
6487
  * This function will _not_ return true if passed a type which
@@ -6636,14 +6717,12 @@ declare namespace ts {
6636
6717
  }) | (void & {
6637
6718
  __escapedIdentifier: void;
6638
6719
  }) | InternalSymbolName;
6639
- /** ReadonlyMap where keys are `__String`s. */
6640
- interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyMap<__String, T> {
6641
- }
6642
- /** Map where keys are `__String`s. */
6643
- interface UnderscoreEscapedMap<T> extends Map<__String, T> {
6644
- }
6720
+ /** @deprecated Use ReadonlyMap<__String, T> instead. */
6721
+ type ReadonlyUnderscoreEscapedMap<T> = ReadonlyMap<__String, T>;
6722
+ /** @deprecated Use Map<__String, T> instead. */
6723
+ type UnderscoreEscapedMap<T> = Map<__String, T>;
6645
6724
  /** SymbolTable based on ES6 Map interface. */
6646
- type SymbolTable = UnderscoreEscapedMap<Symbol>;
6725
+ type SymbolTable = Map<__String, Symbol>;
6647
6726
  enum TypeFlags {
6648
6727
  Any = 1,
6649
6728
  Unknown = 2,
@@ -7870,14 +7949,16 @@ declare namespace ts {
7870
7949
  createJsxOpeningFragment(): JsxOpeningFragment;
7871
7950
  createJsxJsxClosingFragment(): JsxClosingFragment;
7872
7951
  updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
7873
- createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
7874
- updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
7952
+ createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
7953
+ updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
7875
7954
  createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
7876
7955
  updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
7877
7956
  createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
7878
7957
  updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
7879
7958
  createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
7880
7959
  updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
7960
+ createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName;
7961
+ updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName;
7881
7962
  createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
7882
7963
  updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
7883
7964
  createDefaultClause(statements: readonly Statement[]): DefaultClause;
@@ -8159,7 +8240,6 @@ declare namespace ts {
8159
8240
  noEmitHelpers?: boolean;
8160
8241
  }
8161
8242
  interface GetEffectiveTypeRootsHost {
8162
- directoryExists?(directoryName: string): boolean;
8163
8243
  getCurrentDirectory?(): string;
8164
8244
  }
8165
8245
  interface TextSpan {
@@ -8361,11 +8441,17 @@ declare namespace ts {
8361
8441
  function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
8362
8442
  function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean;
8363
8443
  function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
8364
- type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
8444
+ type ErrorCallback = (message: DiagnosticMessage, length: number, arg0?: any) => void;
8365
8445
  interface Scanner {
8446
+ /** @deprecated use {@link getTokenFullStart} */
8366
8447
  getStartPos(): number;
8367
8448
  getToken(): SyntaxKind;
8449
+ getTokenFullStart(): number;
8450
+ getTokenStart(): number;
8451
+ getTokenEnd(): number;
8452
+ /** @deprecated use {@link getTokenEnd} */
8368
8453
  getTextPos(): number;
8454
+ /** @deprecated use {@link getTokenStart} */
8369
8455
  getTokenPos(): number;
8370
8456
  getTokenText(): string;
8371
8457
  getTokenValue(): string;
@@ -8379,6 +8465,7 @@ declare namespace ts {
8379
8465
  reScanSlashToken(): SyntaxKind;
8380
8466
  reScanAsteriskEqualsToken(): SyntaxKind;
8381
8467
  reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
8468
+ /** @deprecated use {@link reScanTemplateToken}(false) */
8382
8469
  reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
8383
8470
  scanJsxIdentifier(): SyntaxKind;
8384
8471
  scanJsxAttributeValue(): SyntaxKind;
@@ -8396,7 +8483,9 @@ declare namespace ts {
8396
8483
  setOnError(onError: ErrorCallback | undefined): void;
8397
8484
  setScriptTarget(scriptTarget: ScriptTarget): void;
8398
8485
  setLanguageVariant(variant: LanguageVariant): void;
8486
+ /** @deprecated use {@link resetTokenState} */
8399
8487
  setTextPos(textPos: number): void;
8488
+ resetTokenState(pos: number): void;
8400
8489
  lookAhead<T>(callback: () => T): T;
8401
8490
  scanRange<T>(start: number, length: number, callback: () => T): T;
8402
8491
  tryScan<T>(callback: () => T): T;
@@ -8940,6 +9029,7 @@ declare namespace ts {
8940
9029
  function isJsxAttributes(node: Node): node is JsxAttributes;
8941
9030
  function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
8942
9031
  function isJsxExpression(node: Node): node is JsxExpression;
9032
+ function isJsxNamespacedName(node: Node): node is JsxNamespacedName;
8943
9033
  function isCaseClause(node: Node): node is CaseClause;
8944
9034
  function isDefaultClause(node: Node): node is DefaultClause;
8945
9035
  function isHeritageClause(node: Node): node is HeritageClause;
@@ -9333,7 +9423,7 @@ declare namespace ts {
9333
9423
  * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
9334
9424
  * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
9335
9425
  */
9336
- function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ts.ResolutionMode;
9426
+ function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ResolutionMode;
9337
9427
  /**
9338
9428
  * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
9339
9429
  * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
@@ -9353,7 +9443,7 @@ declare namespace ts {
9353
9443
  */
9354
9444
  function getModeForUsageLocation(file: {
9355
9445
  impliedNodeFormat?: ResolutionMode;
9356
- }, usage: StringLiteralLike): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined;
9446
+ }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
9357
9447
  function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
9358
9448
  /**
9359
9449
  * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
@@ -9534,8 +9624,8 @@ declare namespace ts {
9534
9624
  */
9535
9625
  emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
9536
9626
  }
9537
- function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): ts.EmitAndSemanticDiagnosticsBuilderProgram | undefined;
9538
- function createIncrementalCompilerHost(options: CompilerOptions, system?: ts.System): CompilerHost;
9627
+ function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
9628
+ function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
9539
9629
  function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
9540
9630
  /**
9541
9631
  * Create the watch compiler host for either configFile or fileNames and its options
@@ -9691,8 +9781,8 @@ declare namespace ts {
9691
9781
  * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic
9692
9782
  */
9693
9783
  function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter;
9694
- function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: ts.System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): ts.SolutionBuilderHost<T>;
9695
- function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: ts.System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): ts.SolutionBuilderWithWatchHost<T>;
9784
+ function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>;
9785
+ function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>;
9696
9786
  function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>;
9697
9787
  function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>;
9698
9788
  interface BuildOptions {
@@ -9782,6 +9872,14 @@ declare namespace ts {
9782
9872
  emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
9783
9873
  }
9784
9874
  type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
9875
+ namespace JsTyping {
9876
+ interface TypingResolutionHost {
9877
+ directoryExists(path: string): boolean;
9878
+ fileExists(fileName: string): boolean;
9879
+ readFile(path: string, encoding?: string): string | undefined;
9880
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
9881
+ }
9882
+ }
9785
9883
  function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
9786
9884
  /**
9787
9885
  * Represents an immutable snapshot of a script at a specified time.Once acquired, the
@@ -9996,8 +10094,6 @@ declare namespace ts {
9996
10094
  findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
9997
10095
  getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
9998
10096
  getFileReferences(fileName: string): ReferenceEntry[];
9999
- /** @deprecated */
10000
- getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
10001
10097
  getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
10002
10098
  getNavigationBarItems(fileName: string): NavigationBarItem[];
10003
10099
  getNavigationTree(fileName: string): NavigationTree;
@@ -10019,6 +10115,7 @@ declare namespace ts {
10019
10115
  * Editors should call this after `>` is typed.
10020
10116
  */
10021
10117
  getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
10118
+ getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingInfo | undefined;
10022
10119
  getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
10023
10120
  toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
10024
10121
  getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
@@ -10048,6 +10145,10 @@ declare namespace ts {
10048
10145
  interface JsxClosingTagInfo {
10049
10146
  readonly newText: string;
10050
10147
  }
10148
+ interface LinkedEditingInfo {
10149
+ readonly ranges: TextSpan[];
10150
+ wordPattern?: string;
10151
+ }
10051
10152
  interface CombinedCodeFixScope {
10052
10153
  type: "file";
10053
10154
  fileName: string;
@@ -10436,6 +10537,7 @@ declare namespace ts {
10436
10537
  readonly insertSpaceBeforeTypeAnnotation?: boolean;
10437
10538
  readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
10438
10539
  readonly semicolons?: SemicolonPreference;
10540
+ readonly indentSwitchCase?: boolean;
10439
10541
  }
10440
10542
  interface DefinitionInfo extends DocumentSpan {
10441
10543
  kind: ScriptElementKind;