@@ -442,6 +442,7 @@ module Ts =
442
442
abstract isImportEqualsDeclaration: node: Node -> bool
443
443
abstract isImportDeclaration: node: Node -> bool
444
444
abstract isImportClause: node: Node -> bool
445
+ abstract isImportTypeAssertionContainer: node: Node -> bool
445
446
abstract isAssertClause: node: Node -> bool
446
447
abstract isAssertEntry: node: Node -> bool
447
448
abstract isNamespaceImport: node: Node -> bool
@@ -657,6 +658,27 @@ module Ts =
657
658
abstract formatDiagnostic: diagnostic: Diagnostic * host: FormatDiagnosticsHost -> string
658
659
abstract formatDiagnosticsWithColorAndContext: diagnostics: Diagnostic[] * host: FormatDiagnosticsHost -> string
659
660
abstract flattenDiagnosticMessageText: diag: U2<string, DiagnosticMessageChain> option * newLine: string * ?indent: float -> string
661
+ /// Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
662
+ /// provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
663
+ abstract getModeForFileReference: ref: U2<FileReference, string> * containingFileMode: obj -> ModuleKind option
664
+ /// <summary>
665
+ /// Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
666
+ /// 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).
667
+ /// If you have an actual import node, prefer using getModeForUsageLocation on the reference string node.
668
+ /// </summary>
669
+ /// <param name="file">File to fetch the resolution mode within</param>
670
+ /// <param name="index">Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations</param>
671
+ abstract getModeForResolutionAtIndex: file: SourceFile * index: float -> ModuleKind option
672
+ /// <summary>
673
+ /// Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
674
+ /// one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
675
+ /// Notably, this function always returns <c>undefined</c> if the containing file has an <c>undefined</c> <c>impliedNodeFormat</c> - this field is only set when
676
+ /// <c>moduleResolution</c> is <c>node16</c>+.
677
+ /// </summary>
678
+ /// <param name="file">The file the import or import-like reference is contained within</param>
679
+ /// <param name="usage">The module reference string</param>
680
+ /// <returns>The final resolution mode of the import</returns>
681
+ abstract getModeForUsageLocation: file: {| impliedNodeFormat: obj option |} * usage: StringLiteralLike -> ModuleKind option
660
682
abstract getConfigFileParsingDiagnostics: configFileParseResult: ParsedCommandLine -> Diagnostic[]
661
683
/// <summary>
662
684
/// A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
@@ -2178,37 +2200,37 @@ module Ts =
2178
2200
inherit Token<'TKind>
2179
2201
2180
2202
type DotToken =
2181
- inherit PunctuationToken<SyntaxKind>
2203
+ PunctuationToken<SyntaxKind>
2182
2204
2183
2205
type DotDotDotToken =
2184
- inherit PunctuationToken<SyntaxKind>
2206
+ PunctuationToken<SyntaxKind>
2185
2207
2186
2208
type QuestionToken =
2187
- inherit PunctuationToken<SyntaxKind>
2209
+ PunctuationToken<SyntaxKind>
2188
2210
2189
2211
type ExclamationToken =
2190
- inherit PunctuationToken<SyntaxKind>
2212
+ PunctuationToken<SyntaxKind>
2191
2213
2192
2214
type ColonToken =
2193
- inherit PunctuationToken<SyntaxKind>
2215
+ PunctuationToken<SyntaxKind>
2194
2216
2195
2217
type EqualsToken =
2196
- inherit PunctuationToken<SyntaxKind>
2218
+ PunctuationToken<SyntaxKind>
2197
2219
2198
2220
type AsteriskToken =
2199
- inherit PunctuationToken<SyntaxKind>
2221
+ PunctuationToken<SyntaxKind>
2200
2222
2201
2223
type EqualsGreaterThanToken =
2202
- inherit PunctuationToken<SyntaxKind>
2224
+ PunctuationToken<SyntaxKind>
2203
2225
2204
2226
type PlusToken =
2205
- inherit PunctuationToken<SyntaxKind>
2227
+ PunctuationToken<SyntaxKind>
2206
2228
2207
2229
type MinusToken =
2208
- inherit PunctuationToken<SyntaxKind>
2230
+ PunctuationToken<SyntaxKind>
2209
2231
2210
2232
type QuestionDotToken =
2211
- inherit PunctuationToken<SyntaxKind>
2233
+ PunctuationToken<SyntaxKind>
2212
2234
2213
2235
type [<AllowNullLiteral>] KeywordToken<'TKind> =
2214
2236
inherit Token<'TKind>
@@ -2234,46 +2256,46 @@ module Ts =
2234
2256
inherit KeywordToken<'TKind>
2235
2257
2236
2258
type AbstractKeyword =
2237
- inherit ModifierToken<SyntaxKind>
2259
+ ModifierToken<SyntaxKind>
2238
2260
2239
2261
type AsyncKeyword =
2240
- inherit ModifierToken<SyntaxKind>
2262
+ ModifierToken<SyntaxKind>
2241
2263
2242
2264
type ConstKeyword =
2243
- inherit ModifierToken<SyntaxKind>
2265
+ ModifierToken<SyntaxKind>
2244
2266
2245
2267
type DeclareKeyword =
2246
- inherit ModifierToken<SyntaxKind>
2268
+ ModifierToken<SyntaxKind>
2247
2269
2248
2270
type DefaultKeyword =
2249
- inherit ModifierToken<SyntaxKind>
2271
+ ModifierToken<SyntaxKind>
2250
2272
2251
2273
type ExportKeyword =
2252
- inherit ModifierToken<SyntaxKind>
2274
+ ModifierToken<SyntaxKind>
2253
2275
2254
2276
type InKeyword =
2255
- inherit ModifierToken<SyntaxKind>
2277
+ ModifierToken<SyntaxKind>
2256
2278
2257
2279
type PrivateKeyword =
2258
- inherit ModifierToken<SyntaxKind>
2280
+ ModifierToken<SyntaxKind>
2259
2281
2260
2282
type ProtectedKeyword =
2261
- inherit ModifierToken<SyntaxKind>
2283
+ ModifierToken<SyntaxKind>
2262
2284
2263
2285
type PublicKeyword =
2264
- inherit ModifierToken<SyntaxKind>
2286
+ ModifierToken<SyntaxKind>
2265
2287
2266
2288
type ReadonlyKeyword =
2267
- inherit ModifierToken<SyntaxKind>
2289
+ ModifierToken<SyntaxKind>
2268
2290
2269
2291
type OutKeyword =
2270
- inherit ModifierToken<SyntaxKind>
2292
+ ModifierToken<SyntaxKind>
2271
2293
2272
2294
type OverrideKeyword =
2273
- inherit ModifierToken<SyntaxKind>
2295
+ ModifierToken<SyntaxKind>
2274
2296
2275
2297
type StaticKeyword =
2276
- inherit ModifierToken<SyntaxKind>
2298
+ ModifierToken<SyntaxKind>
2277
2299
2278
2300
[<Obsolete("Use `ReadonlyKeyword` instead.")>]
2279
2301
type ReadonlyToken =
@@ -2296,50 +2318,24 @@ module Ts =
2296
2318
| [<CompiledValue(124)>] StaticKeyword of StaticKeyword
2297
2319
[<Emit("$0.kind")>]
2298
2320
member _.kind : SyntaxKind = jsNative
2299
- static member inline op_ErasedCast(x: AbstractKeyword) = AbstractKeyword x
2300
- static member inline op_ErasedCast(x: AsyncKeyword) = AsyncKeyword x
2301
- static member inline op_ErasedCast(x: ConstKeyword) = ConstKeyword x
2302
- static member inline op_ErasedCast(x: DeclareKeyword) = DeclareKeyword x
2303
- static member inline op_ErasedCast(x: DefaultKeyword) = DefaultKeyword x
2304
- static member inline op_ErasedCast(x: ExportKeyword) = ExportKeyword x
2305
- static member inline op_ErasedCast(x: InKeyword) = InKeyword x
2306
- static member inline op_ErasedCast(x: OutKeyword) = OutKeyword x
2307
- static member inline op_ErasedCast(x: OverrideKeyword) = OverrideKeyword x
2308
- static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
2309
- static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
2310
- static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
2311
- static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x
2312
- static member inline op_ErasedCast(x: StaticKeyword) = StaticKeyword x
2313
2321
2314
2322
type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] AccessibilityModifier =
2315
2323
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
2316
2324
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
2317
2325
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
2318
- static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
2319
- static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
2320
- static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
2321
2326
2322
2327
type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] ParameterPropertyModifier =
2323
2328
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
2324
2329
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
2325
2330
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
2326
2331
| [<CompiledValue(145)>] ReadonlyKeyword of ReadonlyKeyword
2327
- static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
2328
- static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
2329
- static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
2330
- static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x
2331
2332
2332
2333
type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] ClassMemberModifier =
2333
2334
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
2334
2335
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
2335
2336
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
2336
2337
| [<CompiledValue(145)>] ReadonlyKeyword of ReadonlyKeyword
2337
2338
| [<CompiledValue(124)>] StaticKeyword of StaticKeyword
2338
- static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
2339
- static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
2340
- static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
2341
- static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x
2342
- static member inline op_ErasedCast(x: StaticKeyword) = StaticKeyword x
2343
2339
2344
2340
type ModifiersArray =
2345
2341
Modifier[]
@@ -6720,7 +6716,7 @@ Use typeAcquisition.enable instead.")>]
6720
6716
[<Emit("$0($1...)")>] abstract Invoke: nodes: 'T[] * visitor: Visitor option * ?test: (Node -> bool) * ?start: float * ?count: float -> 'T[]
6721
6717
[<Emit("$0($1...)")>] abstract Invoke: nodes: 'T[] option * visitor: Visitor option * ?test: (Node -> bool) * ?start: float * ?count: float -> 'T[] option
6722
6718
6723
- type VisitResult<'T> =
6719
+ type VisitResult<'T when 'T :> Node > =
6724
6720
U2<'T, 'T[]> option
6725
6721
6726
6722
type [<AllowNullLiteral>] Printer =
@@ -7751,8 +7747,8 @@ Use typeAcquisition.enable instead.")>]
7751
7747
abstract skipDestructiveCodeActions: bool option with get, set
7752
7748
7753
7749
type [<StringEnum>] [<RequireQualifiedAccess>] CompletionsTriggerCharacter =
7754
- | [<CompiledName(".")>] Dot
7755
- | [<CompiledName("\"")>] DoubleQuote
7750
+ | [<CompiledName(".")>] Period
7751
+ | [<CompiledName("\"")>] Backslash
7756
7752
| [<CompiledName("'")>] SingleQuote
7757
7753
| [<CompiledName("`")>] BackQuote
7758
7754
| [<CompiledName("/")>] Slash
0 commit comments