@@ -2335,6 +2335,7 @@ declare namespace ts {
23352335 }
23362336 interface TypeChecker {
23372337 getTypeOfSymbolAtLocation ( symbol : Symbol , node : Node ) : Type ;
2338+ getTypeOfSymbol ( symbol : Symbol ) : Type ;
23382339 getDeclaredTypeOfSymbol ( symbol : Symbol ) : Type ;
23392340 getPropertiesOfType ( type : Type ) : Symbol [ ] ;
23402341 getPropertyOfType ( type : Type , propertyName : string ) : Symbol | undefined ;
@@ -2425,6 +2426,21 @@ declare namespace ts {
24252426 getApparentType ( type : Type ) : Type ;
24262427 getBaseConstraintOfType ( type : Type ) : Type | undefined ;
24272428 getDefaultFromTypeParameter ( type : Type ) : Type | undefined ;
2429+ /**
2430+ * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts.
2431+ * This function will _not_ return true if passed a type which
2432+ * extends `Array` (for example, the TypeScript AST's `NodeArray` type).
2433+ */
2434+ isArrayType ( type : Type ) : boolean ;
2435+ /**
2436+ * True if this type is a tuple type. This function will _not_ return true if
2437+ * passed a type which extends from a tuple.
2438+ */
2439+ isTupleType ( type : Type ) : boolean ;
2440+ /**
2441+ * True if this type is assignable to `ReadonlyArray<any>`.
2442+ */
2443+ isArrayLikeType ( type : Type ) : boolean ;
24282444 getTypePredicateOfSignature ( signature : Signature ) : TypePredicate | undefined ;
24292445 /**
24302446 * Depending on the operation performed, it may be appropriate to throw away the checker
@@ -2684,7 +2700,8 @@ declare namespace ts {
26842700 TemplateLiteral = 134217728 ,
26852701 StringMapping = 268435456 ,
26862702 Literal = 2944 ,
2687- Unit = 109440 ,
2703+ Unit = 109472 ,
2704+ Freshable = 2976 ,
26882705 StringOrNumberLiteral = 384 ,
26892706 PossiblyFalsy = 117724 ,
26902707 StringLike = 402653316 ,
@@ -2736,10 +2753,12 @@ declare namespace ts {
27362753 isClass ( ) : this is InterfaceType ;
27372754 isIndexType ( ) : this is IndexType ;
27382755 }
2739- interface LiteralType extends Type {
2756+ interface FreshableType extends Type {
2757+ freshType : FreshableType ;
2758+ regularType : FreshableType ;
2759+ }
2760+ interface LiteralType extends FreshableType {
27402761 value : string | number | PseudoBigInt ;
2741- freshType : LiteralType ;
2742- regularType : LiteralType ;
27432762 }
27442763 interface UniqueESSymbolType extends Type {
27452764 symbol : Symbol ;
@@ -2754,7 +2773,7 @@ declare namespace ts {
27542773 interface BigIntLiteralType extends LiteralType {
27552774 value : PseudoBigInt ;
27562775 }
2757- interface EnumType extends Type {
2776+ interface EnumType extends FreshableType {
27582777 }
27592778 enum ObjectFlags {
27602779 None = 0 ,
@@ -2997,6 +3016,12 @@ declare namespace ts {
29973016 }
29983017 enum ModuleResolutionKind {
29993018 Classic = 1 ,
3019+ /**
3020+ * @deprecated
3021+ * `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
3022+ * Use the new name or consider switching to a modern module resolution target.
3023+ */
3024+ NodeJs = 2 ,
30003025 Node10 = 2 ,
30013026 Node16 = 3 ,
30023027 NodeNext = 99 ,
@@ -4286,7 +4311,6 @@ declare namespace ts {
42864311 negative : boolean ;
42874312 base10Value : string ;
42884313 }
4289- function getNodeMajorVersion ( ) : number | undefined ;
42904314 enum FileWatcherEventKind {
42914315 Created = 0 ,
42924316 Changed = 1 ,
@@ -4698,7 +4722,6 @@ declare namespace ts {
46984722 parent : ConstructorDeclaration ;
46994723 name : Identifier ;
47004724 } ;
4701- function emitModuleKindIsNonNodeESM ( moduleKind : ModuleKind ) : boolean ;
47024725 /** @deprecated */
47034726 function createUnparsedSourceFile ( text : string ) : UnparsedSource ;
47044727 /** @deprecated */
@@ -5153,7 +5176,6 @@ declare namespace ts {
51535176 function bundlerModuleNameResolver ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost , cache ?: ModuleResolutionCache , redirectedReference ?: ResolvedProjectReference ) : ResolvedModuleWithFailedLookupLocations ;
51545177 function nodeModuleNameResolver ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost , cache ?: ModuleResolutionCache , redirectedReference ?: ResolvedProjectReference ) : ResolvedModuleWithFailedLookupLocations ;
51555178 function classicNameResolver ( moduleName : string , containingFile : string , compilerOptions : CompilerOptions , host : ModuleResolutionHost , cache ?: NonRelativeModuleNameResolutionCache , redirectedReference ?: ResolvedProjectReference ) : ResolvedModuleWithFailedLookupLocations ;
5156- function shouldAllowImportingTsExtension ( compilerOptions : CompilerOptions , fromFileName ?: string ) : boolean | "" | undefined ;
51575179 interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache < ResolvedTypeReferenceDirectiveWithFailedLookupLocations > , NonRelativeNameResolutionCache < ResolvedTypeReferenceDirectiveWithFailedLookupLocations > , PackageJsonInfoCache {
51585180 }
51595181 interface ModeAwareCache < T > {
@@ -6154,6 +6176,13 @@ declare namespace ts {
61546176 */
61556177 triggerCharacter ?: CompletionsTriggerCharacter ;
61566178 triggerKind ?: CompletionTriggerKind ;
6179+ /**
6180+ * Include a `symbol` property on each completion entry object.
6181+ * Symbols reference cyclic data structures and sometimes an entire TypeChecker instance,
6182+ * so use caution when serializing or retaining completion entries retrieved with this option.
6183+ * @default false
6184+ */
6185+ includeSymbol ?: boolean ;
61576186 /** @deprecated Use includeCompletionsForModuleExports */
61586187 includeExternalModuleExports ?: boolean ;
61596188 /** @deprecated Use includeCompletionsWithInsertText */
@@ -6674,6 +6703,7 @@ declare namespace ts {
66746703 * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default.
66756704 */
66766705 exportName : string ;
6706+ exportMapKey ?: string ;
66776707 moduleSpecifier ?: string ;
66786708 /** The file name declaring the export's module symbol, if it was an external module */
66796709 fileName ?: string ;
@@ -6683,7 +6713,6 @@ declare namespace ts {
66836713 isPackageJsonImport ?: true ;
66846714 }
66856715 interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport {
6686- /** The key in the `ExportMapCache` where the completion entry's `SymbolExportInfo[]` is found */
66876716 exportMapKey : string ;
66886717 }
66896718 interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport {
@@ -6711,6 +6740,12 @@ declare namespace ts {
67116740 isFromUncheckedFile ?: true ;
67126741 isPackageJsonImport ?: true ;
67136742 isImportStatementCompletion ?: true ;
6743+ /**
6744+ * For API purposes.
6745+ * Included for non-string completions only when `includeSymbol: true` option is passed to `getCompletionsAtPosition`.
6746+ * @example Get declaration of completion: `symbol.valueDeclaration`
6747+ */
6748+ symbol ?: Symbol ;
67146749 /**
67156750 * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
67166751 * that allows TS Server to look up the symbol represented by the completion item, disambiguating
0 commit comments