typescript 5.1.0-dev.20230407 → 5.1.0-dev.20230409

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",
@@ -877,6 +886,16 @@ declare namespace ts {
877
886
  interface JsxClosingTagResponse extends Response {
878
887
  readonly body: TextInsertion;
879
888
  }
889
+ interface LinkedEditingRangeRequest extends FileLocationRequest {
890
+ readonly command: CommandTypes.LinkedEditingRange;
891
+ }
892
+ interface LinkedEditingRangesBody {
893
+ ranges: TextSpan[];
894
+ wordPattern?: string;
895
+ }
896
+ interface LinkedEditingRangeResponse extends Response {
897
+ readonly body: LinkedEditingRangesBody;
898
+ }
880
899
  /**
881
900
  * Get document highlights request; value of command field is
882
901
  * "documentHighlights". Return response giving spans that are relevant
@@ -2965,6 +2984,54 @@ declare namespace ts {
2965
2984
  bigintLiteral = 25
2966
2985
  }
2967
2986
  }
2987
+ namespace typingsInstaller {
2988
+ interface Log {
2989
+ isEnabled(): boolean;
2990
+ writeLine(text: string): void;
2991
+ }
2992
+ type RequestCompletedAction = (success: boolean) => void;
2993
+ interface PendingRequest {
2994
+ requestId: number;
2995
+ packageNames: string[];
2996
+ cwd: string;
2997
+ onRequestCompleted: RequestCompletedAction;
2998
+ }
2999
+ abstract class TypingsInstaller {
3000
+ protected readonly installTypingHost: InstallTypingHost;
3001
+ private readonly globalCachePath;
3002
+ private readonly safeListPath;
3003
+ private readonly typesMapLocation;
3004
+ private readonly throttleLimit;
3005
+ protected readonly log: Log;
3006
+ private readonly packageNameToTypingLocation;
3007
+ private readonly missingTypingsSet;
3008
+ private readonly knownCachesSet;
3009
+ private readonly projectWatchers;
3010
+ private safeList;
3011
+ private readonly toCanonicalFileName;
3012
+ private readonly globalCachePackageJsonPath;
3013
+ private installRunCount;
3014
+ private inFlightRequestCount;
3015
+ abstract readonly typesRegistry: Map<string, MapLike<string>>;
3016
+ constructor(installTypingHost: InstallTypingHost, globalCachePath: string, safeListPath: Path, typesMapLocation: Path, throttleLimit: number, log?: Log);
3017
+ closeProject(req: CloseProject): void;
3018
+ private closeWatchers;
3019
+ install(req: DiscoverTypings): void;
3020
+ private initializeSafeList;
3021
+ private processCacheLocation;
3022
+ private filterTypings;
3023
+ protected ensurePackageDirectoryExists(directory: string): void;
3024
+ private installTypings;
3025
+ private ensureDirectoryExists;
3026
+ private watchFiles;
3027
+ private createSetTypings;
3028
+ private installTypingsAsync;
3029
+ private executeWithThrottling;
3030
+ protected abstract installWorker(requestId: number, packageNames: string[], cwd: string, onRequestCompleted: RequestCompletedAction): void;
3031
+ protected abstract sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes): void;
3032
+ protected readonly latestDistTag = "latest";
3033
+ }
3034
+ }
2968
3035
  interface CompressedData {
2969
3036
  length: number;
2970
3037
  compressionKind: string;
@@ -3847,6 +3914,7 @@ declare namespace ts {
3847
3914
  private getSemanticDiagnosticsSync;
3848
3915
  private getSuggestionDiagnosticsSync;
3849
3916
  private getJsxClosingTag;
3917
+ private getLinkedEditingRange;
3850
3918
  private getDocumentHighlights;
3851
3919
  private provideInlayHints;
3852
3920
  private setCompilerOptionsForInferredProjects;
@@ -3994,395 +4062,396 @@ declare namespace ts {
3994
4062
  WhitespaceTrivia = 5,
3995
4063
  ShebangTrivia = 6,
3996
4064
  ConflictMarkerTrivia = 7,
3997
- NumericLiteral = 8,
3998
- BigIntLiteral = 9,
3999
- StringLiteral = 10,
4000
- JsxText = 11,
4001
- JsxTextAllWhiteSpaces = 12,
4002
- RegularExpressionLiteral = 13,
4003
- NoSubstitutionTemplateLiteral = 14,
4004
- TemplateHead = 15,
4005
- TemplateMiddle = 16,
4006
- TemplateTail = 17,
4007
- OpenBraceToken = 18,
4008
- CloseBraceToken = 19,
4009
- OpenParenToken = 20,
4010
- CloseParenToken = 21,
4011
- OpenBracketToken = 22,
4012
- CloseBracketToken = 23,
4013
- DotToken = 24,
4014
- DotDotDotToken = 25,
4015
- SemicolonToken = 26,
4016
- CommaToken = 27,
4017
- QuestionDotToken = 28,
4018
- LessThanToken = 29,
4019
- LessThanSlashToken = 30,
4020
- GreaterThanToken = 31,
4021
- LessThanEqualsToken = 32,
4022
- GreaterThanEqualsToken = 33,
4023
- EqualsEqualsToken = 34,
4024
- ExclamationEqualsToken = 35,
4025
- EqualsEqualsEqualsToken = 36,
4026
- ExclamationEqualsEqualsToken = 37,
4027
- EqualsGreaterThanToken = 38,
4028
- PlusToken = 39,
4029
- MinusToken = 40,
4030
- AsteriskToken = 41,
4031
- AsteriskAsteriskToken = 42,
4032
- SlashToken = 43,
4033
- PercentToken = 44,
4034
- PlusPlusToken = 45,
4035
- MinusMinusToken = 46,
4036
- LessThanLessThanToken = 47,
4037
- GreaterThanGreaterThanToken = 48,
4038
- GreaterThanGreaterThanGreaterThanToken = 49,
4039
- AmpersandToken = 50,
4040
- BarToken = 51,
4041
- CaretToken = 52,
4042
- ExclamationToken = 53,
4043
- TildeToken = 54,
4044
- AmpersandAmpersandToken = 55,
4045
- BarBarToken = 56,
4046
- QuestionToken = 57,
4047
- ColonToken = 58,
4048
- AtToken = 59,
4049
- QuestionQuestionToken = 60,
4065
+ NonTextFileMarkerTrivia = 8,
4066
+ NumericLiteral = 9,
4067
+ BigIntLiteral = 10,
4068
+ StringLiteral = 11,
4069
+ JsxText = 12,
4070
+ JsxTextAllWhiteSpaces = 13,
4071
+ RegularExpressionLiteral = 14,
4072
+ NoSubstitutionTemplateLiteral = 15,
4073
+ TemplateHead = 16,
4074
+ TemplateMiddle = 17,
4075
+ TemplateTail = 18,
4076
+ OpenBraceToken = 19,
4077
+ CloseBraceToken = 20,
4078
+ OpenParenToken = 21,
4079
+ CloseParenToken = 22,
4080
+ OpenBracketToken = 23,
4081
+ CloseBracketToken = 24,
4082
+ DotToken = 25,
4083
+ DotDotDotToken = 26,
4084
+ SemicolonToken = 27,
4085
+ CommaToken = 28,
4086
+ QuestionDotToken = 29,
4087
+ LessThanToken = 30,
4088
+ LessThanSlashToken = 31,
4089
+ GreaterThanToken = 32,
4090
+ LessThanEqualsToken = 33,
4091
+ GreaterThanEqualsToken = 34,
4092
+ EqualsEqualsToken = 35,
4093
+ ExclamationEqualsToken = 36,
4094
+ EqualsEqualsEqualsToken = 37,
4095
+ ExclamationEqualsEqualsToken = 38,
4096
+ EqualsGreaterThanToken = 39,
4097
+ PlusToken = 40,
4098
+ MinusToken = 41,
4099
+ AsteriskToken = 42,
4100
+ AsteriskAsteriskToken = 43,
4101
+ SlashToken = 44,
4102
+ PercentToken = 45,
4103
+ PlusPlusToken = 46,
4104
+ MinusMinusToken = 47,
4105
+ LessThanLessThanToken = 48,
4106
+ GreaterThanGreaterThanToken = 49,
4107
+ GreaterThanGreaterThanGreaterThanToken = 50,
4108
+ AmpersandToken = 51,
4109
+ BarToken = 52,
4110
+ CaretToken = 53,
4111
+ ExclamationToken = 54,
4112
+ TildeToken = 55,
4113
+ AmpersandAmpersandToken = 56,
4114
+ BarBarToken = 57,
4115
+ QuestionToken = 58,
4116
+ ColonToken = 59,
4117
+ AtToken = 60,
4118
+ QuestionQuestionToken = 61,
4050
4119
  /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
4051
- BacktickToken = 61,
4120
+ BacktickToken = 62,
4052
4121
  /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */
4053
- HashToken = 62,
4054
- EqualsToken = 63,
4055
- PlusEqualsToken = 64,
4056
- MinusEqualsToken = 65,
4057
- AsteriskEqualsToken = 66,
4058
- AsteriskAsteriskEqualsToken = 67,
4059
- SlashEqualsToken = 68,
4060
- PercentEqualsToken = 69,
4061
- LessThanLessThanEqualsToken = 70,
4062
- GreaterThanGreaterThanEqualsToken = 71,
4063
- GreaterThanGreaterThanGreaterThanEqualsToken = 72,
4064
- AmpersandEqualsToken = 73,
4065
- BarEqualsToken = 74,
4066
- BarBarEqualsToken = 75,
4067
- AmpersandAmpersandEqualsToken = 76,
4068
- QuestionQuestionEqualsToken = 77,
4069
- CaretEqualsToken = 78,
4070
- Identifier = 79,
4071
- PrivateIdentifier = 80,
4072
- BreakKeyword = 82,
4073
- CaseKeyword = 83,
4074
- CatchKeyword = 84,
4075
- ClassKeyword = 85,
4076
- ConstKeyword = 86,
4077
- ContinueKeyword = 87,
4078
- DebuggerKeyword = 88,
4079
- DefaultKeyword = 89,
4080
- DeleteKeyword = 90,
4081
- DoKeyword = 91,
4082
- ElseKeyword = 92,
4083
- EnumKeyword = 93,
4084
- ExportKeyword = 94,
4085
- ExtendsKeyword = 95,
4086
- FalseKeyword = 96,
4087
- FinallyKeyword = 97,
4088
- ForKeyword = 98,
4089
- FunctionKeyword = 99,
4090
- IfKeyword = 100,
4091
- ImportKeyword = 101,
4092
- InKeyword = 102,
4093
- InstanceOfKeyword = 103,
4094
- NewKeyword = 104,
4095
- NullKeyword = 105,
4096
- ReturnKeyword = 106,
4097
- SuperKeyword = 107,
4098
- SwitchKeyword = 108,
4099
- ThisKeyword = 109,
4100
- ThrowKeyword = 110,
4101
- TrueKeyword = 111,
4102
- TryKeyword = 112,
4103
- TypeOfKeyword = 113,
4104
- VarKeyword = 114,
4105
- VoidKeyword = 115,
4106
- WhileKeyword = 116,
4107
- WithKeyword = 117,
4108
- ImplementsKeyword = 118,
4109
- InterfaceKeyword = 119,
4110
- LetKeyword = 120,
4111
- PackageKeyword = 121,
4112
- PrivateKeyword = 122,
4113
- ProtectedKeyword = 123,
4114
- PublicKeyword = 124,
4115
- StaticKeyword = 125,
4116
- YieldKeyword = 126,
4117
- AbstractKeyword = 127,
4118
- AccessorKeyword = 128,
4119
- AsKeyword = 129,
4120
- AssertsKeyword = 130,
4121
- AssertKeyword = 131,
4122
- AnyKeyword = 132,
4123
- AsyncKeyword = 133,
4124
- AwaitKeyword = 134,
4125
- BooleanKeyword = 135,
4126
- ConstructorKeyword = 136,
4127
- DeclareKeyword = 137,
4128
- GetKeyword = 138,
4129
- InferKeyword = 139,
4130
- IntrinsicKeyword = 140,
4131
- IsKeyword = 141,
4132
- KeyOfKeyword = 142,
4133
- ModuleKeyword = 143,
4134
- NamespaceKeyword = 144,
4135
- NeverKeyword = 145,
4136
- OutKeyword = 146,
4137
- ReadonlyKeyword = 147,
4138
- RequireKeyword = 148,
4139
- NumberKeyword = 149,
4140
- ObjectKeyword = 150,
4141
- SatisfiesKeyword = 151,
4142
- SetKeyword = 152,
4143
- StringKeyword = 153,
4144
- SymbolKeyword = 154,
4145
- TypeKeyword = 155,
4146
- UndefinedKeyword = 156,
4147
- UniqueKeyword = 157,
4148
- UnknownKeyword = 158,
4149
- FromKeyword = 159,
4150
- GlobalKeyword = 160,
4151
- BigIntKeyword = 161,
4152
- OverrideKeyword = 162,
4153
- OfKeyword = 163,
4154
- QualifiedName = 164,
4155
- ComputedPropertyName = 165,
4156
- TypeParameter = 166,
4157
- Parameter = 167,
4158
- Decorator = 168,
4159
- PropertySignature = 169,
4160
- PropertyDeclaration = 170,
4161
- MethodSignature = 171,
4162
- MethodDeclaration = 172,
4163
- ClassStaticBlockDeclaration = 173,
4164
- Constructor = 174,
4165
- GetAccessor = 175,
4166
- SetAccessor = 176,
4167
- CallSignature = 177,
4168
- ConstructSignature = 178,
4169
- IndexSignature = 179,
4170
- TypePredicate = 180,
4171
- TypeReference = 181,
4172
- FunctionType = 182,
4173
- ConstructorType = 183,
4174
- TypeQuery = 184,
4175
- TypeLiteral = 185,
4176
- ArrayType = 186,
4177
- TupleType = 187,
4178
- OptionalType = 188,
4179
- RestType = 189,
4180
- UnionType = 190,
4181
- IntersectionType = 191,
4182
- ConditionalType = 192,
4183
- InferType = 193,
4184
- ParenthesizedType = 194,
4185
- ThisType = 195,
4186
- TypeOperator = 196,
4187
- IndexedAccessType = 197,
4188
- MappedType = 198,
4189
- LiteralType = 199,
4190
- NamedTupleMember = 200,
4191
- TemplateLiteralType = 201,
4192
- TemplateLiteralTypeSpan = 202,
4193
- ImportType = 203,
4194
- ObjectBindingPattern = 204,
4195
- ArrayBindingPattern = 205,
4196
- BindingElement = 206,
4197
- ArrayLiteralExpression = 207,
4198
- ObjectLiteralExpression = 208,
4199
- PropertyAccessExpression = 209,
4200
- ElementAccessExpression = 210,
4201
- CallExpression = 211,
4202
- NewExpression = 212,
4203
- TaggedTemplateExpression = 213,
4204
- TypeAssertionExpression = 214,
4205
- ParenthesizedExpression = 215,
4206
- FunctionExpression = 216,
4207
- ArrowFunction = 217,
4208
- DeleteExpression = 218,
4209
- TypeOfExpression = 219,
4210
- VoidExpression = 220,
4211
- AwaitExpression = 221,
4212
- PrefixUnaryExpression = 222,
4213
- PostfixUnaryExpression = 223,
4214
- BinaryExpression = 224,
4215
- ConditionalExpression = 225,
4216
- TemplateExpression = 226,
4217
- YieldExpression = 227,
4218
- SpreadElement = 228,
4219
- ClassExpression = 229,
4220
- OmittedExpression = 230,
4221
- ExpressionWithTypeArguments = 231,
4222
- AsExpression = 232,
4223
- NonNullExpression = 233,
4224
- MetaProperty = 234,
4225
- SyntheticExpression = 235,
4226
- SatisfiesExpression = 236,
4227
- TemplateSpan = 237,
4228
- SemicolonClassElement = 238,
4229
- Block = 239,
4230
- EmptyStatement = 240,
4231
- VariableStatement = 241,
4232
- ExpressionStatement = 242,
4233
- IfStatement = 243,
4234
- DoStatement = 244,
4235
- WhileStatement = 245,
4236
- ForStatement = 246,
4237
- ForInStatement = 247,
4238
- ForOfStatement = 248,
4239
- ContinueStatement = 249,
4240
- BreakStatement = 250,
4241
- ReturnStatement = 251,
4242
- WithStatement = 252,
4243
- SwitchStatement = 253,
4244
- LabeledStatement = 254,
4245
- ThrowStatement = 255,
4246
- TryStatement = 256,
4247
- DebuggerStatement = 257,
4248
- VariableDeclaration = 258,
4249
- VariableDeclarationList = 259,
4250
- FunctionDeclaration = 260,
4251
- ClassDeclaration = 261,
4252
- InterfaceDeclaration = 262,
4253
- TypeAliasDeclaration = 263,
4254
- EnumDeclaration = 264,
4255
- ModuleDeclaration = 265,
4256
- ModuleBlock = 266,
4257
- CaseBlock = 267,
4258
- NamespaceExportDeclaration = 268,
4259
- ImportEqualsDeclaration = 269,
4260
- ImportDeclaration = 270,
4261
- ImportClause = 271,
4262
- NamespaceImport = 272,
4263
- NamedImports = 273,
4264
- ImportSpecifier = 274,
4265
- ExportAssignment = 275,
4266
- ExportDeclaration = 276,
4267
- NamedExports = 277,
4268
- NamespaceExport = 278,
4269
- ExportSpecifier = 279,
4270
- MissingDeclaration = 280,
4271
- ExternalModuleReference = 281,
4272
- JsxElement = 282,
4273
- JsxSelfClosingElement = 283,
4274
- JsxOpeningElement = 284,
4275
- JsxClosingElement = 285,
4276
- JsxFragment = 286,
4277
- JsxOpeningFragment = 287,
4278
- JsxClosingFragment = 288,
4279
- JsxAttribute = 289,
4280
- JsxAttributes = 290,
4281
- JsxSpreadAttribute = 291,
4282
- JsxExpression = 292,
4283
- CaseClause = 293,
4284
- DefaultClause = 294,
4285
- HeritageClause = 295,
4286
- CatchClause = 296,
4287
- AssertClause = 297,
4288
- AssertEntry = 298,
4289
- ImportTypeAssertionContainer = 299,
4290
- PropertyAssignment = 300,
4291
- ShorthandPropertyAssignment = 301,
4292
- SpreadAssignment = 302,
4293
- EnumMember = 303,
4294
- /** @deprecated */ UnparsedPrologue = 304,
4295
- /** @deprecated */ UnparsedPrepend = 305,
4296
- /** @deprecated */ UnparsedText = 306,
4297
- /** @deprecated */ UnparsedInternalText = 307,
4298
- /** @deprecated */ UnparsedSyntheticReference = 308,
4299
- SourceFile = 309,
4300
- Bundle = 310,
4301
- /** @deprecated */ UnparsedSource = 311,
4302
- /** @deprecated */ InputFiles = 312,
4303
- JSDocTypeExpression = 313,
4304
- JSDocNameReference = 314,
4305
- JSDocMemberName = 315,
4306
- JSDocAllType = 316,
4307
- JSDocUnknownType = 317,
4308
- JSDocNullableType = 318,
4309
- JSDocNonNullableType = 319,
4310
- JSDocOptionalType = 320,
4311
- JSDocFunctionType = 321,
4312
- JSDocVariadicType = 322,
4313
- JSDocNamepathType = 323,
4314
- JSDoc = 324,
4122
+ HashToken = 63,
4123
+ EqualsToken = 64,
4124
+ PlusEqualsToken = 65,
4125
+ MinusEqualsToken = 66,
4126
+ AsteriskEqualsToken = 67,
4127
+ AsteriskAsteriskEqualsToken = 68,
4128
+ SlashEqualsToken = 69,
4129
+ PercentEqualsToken = 70,
4130
+ LessThanLessThanEqualsToken = 71,
4131
+ GreaterThanGreaterThanEqualsToken = 72,
4132
+ GreaterThanGreaterThanGreaterThanEqualsToken = 73,
4133
+ AmpersandEqualsToken = 74,
4134
+ BarEqualsToken = 75,
4135
+ BarBarEqualsToken = 76,
4136
+ AmpersandAmpersandEqualsToken = 77,
4137
+ QuestionQuestionEqualsToken = 78,
4138
+ CaretEqualsToken = 79,
4139
+ Identifier = 80,
4140
+ PrivateIdentifier = 81,
4141
+ BreakKeyword = 83,
4142
+ CaseKeyword = 84,
4143
+ CatchKeyword = 85,
4144
+ ClassKeyword = 86,
4145
+ ConstKeyword = 87,
4146
+ ContinueKeyword = 88,
4147
+ DebuggerKeyword = 89,
4148
+ DefaultKeyword = 90,
4149
+ DeleteKeyword = 91,
4150
+ DoKeyword = 92,
4151
+ ElseKeyword = 93,
4152
+ EnumKeyword = 94,
4153
+ ExportKeyword = 95,
4154
+ ExtendsKeyword = 96,
4155
+ FalseKeyword = 97,
4156
+ FinallyKeyword = 98,
4157
+ ForKeyword = 99,
4158
+ FunctionKeyword = 100,
4159
+ IfKeyword = 101,
4160
+ ImportKeyword = 102,
4161
+ InKeyword = 103,
4162
+ InstanceOfKeyword = 104,
4163
+ NewKeyword = 105,
4164
+ NullKeyword = 106,
4165
+ ReturnKeyword = 107,
4166
+ SuperKeyword = 108,
4167
+ SwitchKeyword = 109,
4168
+ ThisKeyword = 110,
4169
+ ThrowKeyword = 111,
4170
+ TrueKeyword = 112,
4171
+ TryKeyword = 113,
4172
+ TypeOfKeyword = 114,
4173
+ VarKeyword = 115,
4174
+ VoidKeyword = 116,
4175
+ WhileKeyword = 117,
4176
+ WithKeyword = 118,
4177
+ ImplementsKeyword = 119,
4178
+ InterfaceKeyword = 120,
4179
+ LetKeyword = 121,
4180
+ PackageKeyword = 122,
4181
+ PrivateKeyword = 123,
4182
+ ProtectedKeyword = 124,
4183
+ PublicKeyword = 125,
4184
+ StaticKeyword = 126,
4185
+ YieldKeyword = 127,
4186
+ AbstractKeyword = 128,
4187
+ AccessorKeyword = 129,
4188
+ AsKeyword = 130,
4189
+ AssertsKeyword = 131,
4190
+ AssertKeyword = 132,
4191
+ AnyKeyword = 133,
4192
+ AsyncKeyword = 134,
4193
+ AwaitKeyword = 135,
4194
+ BooleanKeyword = 136,
4195
+ ConstructorKeyword = 137,
4196
+ DeclareKeyword = 138,
4197
+ GetKeyword = 139,
4198
+ InferKeyword = 140,
4199
+ IntrinsicKeyword = 141,
4200
+ IsKeyword = 142,
4201
+ KeyOfKeyword = 143,
4202
+ ModuleKeyword = 144,
4203
+ NamespaceKeyword = 145,
4204
+ NeverKeyword = 146,
4205
+ OutKeyword = 147,
4206
+ ReadonlyKeyword = 148,
4207
+ RequireKeyword = 149,
4208
+ NumberKeyword = 150,
4209
+ ObjectKeyword = 151,
4210
+ SatisfiesKeyword = 152,
4211
+ SetKeyword = 153,
4212
+ StringKeyword = 154,
4213
+ SymbolKeyword = 155,
4214
+ TypeKeyword = 156,
4215
+ UndefinedKeyword = 157,
4216
+ UniqueKeyword = 158,
4217
+ UnknownKeyword = 159,
4218
+ FromKeyword = 160,
4219
+ GlobalKeyword = 161,
4220
+ BigIntKeyword = 162,
4221
+ OverrideKeyword = 163,
4222
+ OfKeyword = 164,
4223
+ QualifiedName = 165,
4224
+ ComputedPropertyName = 166,
4225
+ TypeParameter = 167,
4226
+ Parameter = 168,
4227
+ Decorator = 169,
4228
+ PropertySignature = 170,
4229
+ PropertyDeclaration = 171,
4230
+ MethodSignature = 172,
4231
+ MethodDeclaration = 173,
4232
+ ClassStaticBlockDeclaration = 174,
4233
+ Constructor = 175,
4234
+ GetAccessor = 176,
4235
+ SetAccessor = 177,
4236
+ CallSignature = 178,
4237
+ ConstructSignature = 179,
4238
+ IndexSignature = 180,
4239
+ TypePredicate = 181,
4240
+ TypeReference = 182,
4241
+ FunctionType = 183,
4242
+ ConstructorType = 184,
4243
+ TypeQuery = 185,
4244
+ TypeLiteral = 186,
4245
+ ArrayType = 187,
4246
+ TupleType = 188,
4247
+ OptionalType = 189,
4248
+ RestType = 190,
4249
+ UnionType = 191,
4250
+ IntersectionType = 192,
4251
+ ConditionalType = 193,
4252
+ InferType = 194,
4253
+ ParenthesizedType = 195,
4254
+ ThisType = 196,
4255
+ TypeOperator = 197,
4256
+ IndexedAccessType = 198,
4257
+ MappedType = 199,
4258
+ LiteralType = 200,
4259
+ NamedTupleMember = 201,
4260
+ TemplateLiteralType = 202,
4261
+ TemplateLiteralTypeSpan = 203,
4262
+ ImportType = 204,
4263
+ ObjectBindingPattern = 205,
4264
+ ArrayBindingPattern = 206,
4265
+ BindingElement = 207,
4266
+ ArrayLiteralExpression = 208,
4267
+ ObjectLiteralExpression = 209,
4268
+ PropertyAccessExpression = 210,
4269
+ ElementAccessExpression = 211,
4270
+ CallExpression = 212,
4271
+ NewExpression = 213,
4272
+ TaggedTemplateExpression = 214,
4273
+ TypeAssertionExpression = 215,
4274
+ ParenthesizedExpression = 216,
4275
+ FunctionExpression = 217,
4276
+ ArrowFunction = 218,
4277
+ DeleteExpression = 219,
4278
+ TypeOfExpression = 220,
4279
+ VoidExpression = 221,
4280
+ AwaitExpression = 222,
4281
+ PrefixUnaryExpression = 223,
4282
+ PostfixUnaryExpression = 224,
4283
+ BinaryExpression = 225,
4284
+ ConditionalExpression = 226,
4285
+ TemplateExpression = 227,
4286
+ YieldExpression = 228,
4287
+ SpreadElement = 229,
4288
+ ClassExpression = 230,
4289
+ OmittedExpression = 231,
4290
+ ExpressionWithTypeArguments = 232,
4291
+ AsExpression = 233,
4292
+ NonNullExpression = 234,
4293
+ MetaProperty = 235,
4294
+ SyntheticExpression = 236,
4295
+ SatisfiesExpression = 237,
4296
+ TemplateSpan = 238,
4297
+ SemicolonClassElement = 239,
4298
+ Block = 240,
4299
+ EmptyStatement = 241,
4300
+ VariableStatement = 242,
4301
+ ExpressionStatement = 243,
4302
+ IfStatement = 244,
4303
+ DoStatement = 245,
4304
+ WhileStatement = 246,
4305
+ ForStatement = 247,
4306
+ ForInStatement = 248,
4307
+ ForOfStatement = 249,
4308
+ ContinueStatement = 250,
4309
+ BreakStatement = 251,
4310
+ ReturnStatement = 252,
4311
+ WithStatement = 253,
4312
+ SwitchStatement = 254,
4313
+ LabeledStatement = 255,
4314
+ ThrowStatement = 256,
4315
+ TryStatement = 257,
4316
+ DebuggerStatement = 258,
4317
+ VariableDeclaration = 259,
4318
+ VariableDeclarationList = 260,
4319
+ FunctionDeclaration = 261,
4320
+ ClassDeclaration = 262,
4321
+ InterfaceDeclaration = 263,
4322
+ TypeAliasDeclaration = 264,
4323
+ EnumDeclaration = 265,
4324
+ ModuleDeclaration = 266,
4325
+ ModuleBlock = 267,
4326
+ CaseBlock = 268,
4327
+ NamespaceExportDeclaration = 269,
4328
+ ImportEqualsDeclaration = 270,
4329
+ ImportDeclaration = 271,
4330
+ ImportClause = 272,
4331
+ NamespaceImport = 273,
4332
+ NamedImports = 274,
4333
+ ImportSpecifier = 275,
4334
+ ExportAssignment = 276,
4335
+ ExportDeclaration = 277,
4336
+ NamedExports = 278,
4337
+ NamespaceExport = 279,
4338
+ ExportSpecifier = 280,
4339
+ MissingDeclaration = 281,
4340
+ ExternalModuleReference = 282,
4341
+ JsxElement = 283,
4342
+ JsxSelfClosingElement = 284,
4343
+ JsxOpeningElement = 285,
4344
+ JsxClosingElement = 286,
4345
+ JsxFragment = 287,
4346
+ JsxOpeningFragment = 288,
4347
+ JsxClosingFragment = 289,
4348
+ JsxAttribute = 290,
4349
+ JsxAttributes = 291,
4350
+ JsxSpreadAttribute = 292,
4351
+ JsxExpression = 293,
4352
+ CaseClause = 294,
4353
+ DefaultClause = 295,
4354
+ HeritageClause = 296,
4355
+ CatchClause = 297,
4356
+ AssertClause = 298,
4357
+ AssertEntry = 299,
4358
+ ImportTypeAssertionContainer = 300,
4359
+ PropertyAssignment = 301,
4360
+ ShorthandPropertyAssignment = 302,
4361
+ SpreadAssignment = 303,
4362
+ EnumMember = 304,
4363
+ /** @deprecated */ UnparsedPrologue = 305,
4364
+ /** @deprecated */ UnparsedPrepend = 306,
4365
+ /** @deprecated */ UnparsedText = 307,
4366
+ /** @deprecated */ UnparsedInternalText = 308,
4367
+ /** @deprecated */ UnparsedSyntheticReference = 309,
4368
+ SourceFile = 310,
4369
+ Bundle = 311,
4370
+ /** @deprecated */ UnparsedSource = 312,
4371
+ /** @deprecated */ InputFiles = 313,
4372
+ JSDocTypeExpression = 314,
4373
+ JSDocNameReference = 315,
4374
+ JSDocMemberName = 316,
4375
+ JSDocAllType = 317,
4376
+ JSDocUnknownType = 318,
4377
+ JSDocNullableType = 319,
4378
+ JSDocNonNullableType = 320,
4379
+ JSDocOptionalType = 321,
4380
+ JSDocFunctionType = 322,
4381
+ JSDocVariadicType = 323,
4382
+ JSDocNamepathType = 324,
4383
+ JSDoc = 325,
4315
4384
  /** @deprecated Use SyntaxKind.JSDoc */
4316
- JSDocComment = 324,
4317
- JSDocText = 325,
4318
- JSDocTypeLiteral = 326,
4319
- JSDocSignature = 327,
4320
- JSDocLink = 328,
4321
- JSDocLinkCode = 329,
4322
- JSDocLinkPlain = 330,
4323
- JSDocTag = 331,
4324
- JSDocAugmentsTag = 332,
4325
- JSDocImplementsTag = 333,
4326
- JSDocAuthorTag = 334,
4327
- JSDocDeprecatedTag = 335,
4328
- JSDocClassTag = 336,
4329
- JSDocPublicTag = 337,
4330
- JSDocPrivateTag = 338,
4331
- JSDocProtectedTag = 339,
4332
- JSDocReadonlyTag = 340,
4333
- JSDocOverrideTag = 341,
4334
- JSDocCallbackTag = 342,
4335
- JSDocOverloadTag = 343,
4336
- JSDocEnumTag = 344,
4337
- JSDocParameterTag = 345,
4338
- JSDocReturnTag = 346,
4339
- JSDocThisTag = 347,
4340
- JSDocTypeTag = 348,
4341
- JSDocTemplateTag = 349,
4342
- JSDocTypedefTag = 350,
4343
- JSDocSeeTag = 351,
4344
- JSDocPropertyTag = 352,
4345
- JSDocThrowsTag = 353,
4346
- JSDocSatisfiesTag = 354,
4347
- SyntaxList = 355,
4348
- NotEmittedStatement = 356,
4349
- PartiallyEmittedExpression = 357,
4350
- CommaListExpression = 358,
4351
- MergeDeclarationMarker = 359,
4352
- EndOfDeclarationMarker = 360,
4353
- SyntheticReferenceExpression = 361,
4354
- Count = 362,
4355
- FirstAssignment = 63,
4356
- LastAssignment = 78,
4357
- FirstCompoundAssignment = 64,
4358
- LastCompoundAssignment = 78,
4359
- FirstReservedWord = 82,
4360
- LastReservedWord = 117,
4361
- FirstKeyword = 82,
4362
- LastKeyword = 163,
4363
- FirstFutureReservedWord = 118,
4364
- LastFutureReservedWord = 126,
4365
- FirstTypeNode = 180,
4366
- LastTypeNode = 203,
4367
- FirstPunctuation = 18,
4368
- LastPunctuation = 78,
4385
+ JSDocComment = 325,
4386
+ JSDocText = 326,
4387
+ JSDocTypeLiteral = 327,
4388
+ JSDocSignature = 328,
4389
+ JSDocLink = 329,
4390
+ JSDocLinkCode = 330,
4391
+ JSDocLinkPlain = 331,
4392
+ JSDocTag = 332,
4393
+ JSDocAugmentsTag = 333,
4394
+ JSDocImplementsTag = 334,
4395
+ JSDocAuthorTag = 335,
4396
+ JSDocDeprecatedTag = 336,
4397
+ JSDocClassTag = 337,
4398
+ JSDocPublicTag = 338,
4399
+ JSDocPrivateTag = 339,
4400
+ JSDocProtectedTag = 340,
4401
+ JSDocReadonlyTag = 341,
4402
+ JSDocOverrideTag = 342,
4403
+ JSDocCallbackTag = 343,
4404
+ JSDocOverloadTag = 344,
4405
+ JSDocEnumTag = 345,
4406
+ JSDocParameterTag = 346,
4407
+ JSDocReturnTag = 347,
4408
+ JSDocThisTag = 348,
4409
+ JSDocTypeTag = 349,
4410
+ JSDocTemplateTag = 350,
4411
+ JSDocTypedefTag = 351,
4412
+ JSDocSeeTag = 352,
4413
+ JSDocPropertyTag = 353,
4414
+ JSDocThrowsTag = 354,
4415
+ JSDocSatisfiesTag = 355,
4416
+ SyntaxList = 356,
4417
+ NotEmittedStatement = 357,
4418
+ PartiallyEmittedExpression = 358,
4419
+ CommaListExpression = 359,
4420
+ MergeDeclarationMarker = 360,
4421
+ EndOfDeclarationMarker = 361,
4422
+ SyntheticReferenceExpression = 362,
4423
+ Count = 363,
4424
+ FirstAssignment = 64,
4425
+ LastAssignment = 79,
4426
+ FirstCompoundAssignment = 65,
4427
+ LastCompoundAssignment = 79,
4428
+ FirstReservedWord = 83,
4429
+ LastReservedWord = 118,
4430
+ FirstKeyword = 83,
4431
+ LastKeyword = 164,
4432
+ FirstFutureReservedWord = 119,
4433
+ LastFutureReservedWord = 127,
4434
+ FirstTypeNode = 181,
4435
+ LastTypeNode = 204,
4436
+ FirstPunctuation = 19,
4437
+ LastPunctuation = 79,
4369
4438
  FirstToken = 0,
4370
- LastToken = 163,
4439
+ LastToken = 164,
4371
4440
  FirstTriviaToken = 2,
4372
4441
  LastTriviaToken = 7,
4373
- FirstLiteralToken = 8,
4374
- LastLiteralToken = 14,
4375
- FirstTemplateToken = 14,
4376
- LastTemplateToken = 17,
4377
- FirstBinaryOperator = 29,
4378
- LastBinaryOperator = 78,
4379
- FirstStatement = 241,
4380
- LastStatement = 257,
4381
- FirstNode = 164,
4382
- FirstJSDocNode = 313,
4383
- LastJSDocNode = 354,
4384
- FirstJSDocTagNode = 331,
4385
- LastJSDocTagNode = 354
4442
+ FirstLiteralToken = 9,
4443
+ LastLiteralToken = 15,
4444
+ FirstTemplateToken = 15,
4445
+ LastTemplateToken = 18,
4446
+ FirstBinaryOperator = 30,
4447
+ LastBinaryOperator = 79,
4448
+ FirstStatement = 242,
4449
+ LastStatement = 258,
4450
+ FirstNode = 165,
4451
+ FirstJSDocNode = 314,
4452
+ LastJSDocNode = 355,
4453
+ FirstJSDocTagNode = 332,
4454
+ LastJSDocTagNode = 355
4386
4455
  }
4387
4456
  type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
4388
4457
  type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@@ -9790,6 +9859,14 @@ declare namespace ts {
9790
9859
  emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
9791
9860
  }
9792
9861
  type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
9862
+ namespace JsTyping {
9863
+ interface TypingResolutionHost {
9864
+ directoryExists(path: string): boolean;
9865
+ fileExists(fileName: string): boolean;
9866
+ readFile(path: string, encoding?: string): string | undefined;
9867
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
9868
+ }
9869
+ }
9793
9870
  function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
9794
9871
  /**
9795
9872
  * Represents an immutable snapshot of a script at a specified time.Once acquired, the
@@ -10025,6 +10102,7 @@ declare namespace ts {
10025
10102
  * Editors should call this after `>` is typed.
10026
10103
  */
10027
10104
  getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
10105
+ getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingInfo | undefined;
10028
10106
  getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
10029
10107
  toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
10030
10108
  getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
@@ -10054,6 +10132,10 @@ declare namespace ts {
10054
10132
  interface JsxClosingTagInfo {
10055
10133
  readonly newText: string;
10056
10134
  }
10135
+ interface LinkedEditingInfo {
10136
+ readonly ranges: TextSpan[];
10137
+ wordPattern?: string;
10138
+ }
10057
10139
  interface CombinedCodeFixScope {
10058
10140
  type: "file";
10059
10141
  fileName: string;