typescript 7.1.0-dev.20260827.1 → 7.1.0-dev.20260828.1
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.
- package/dist/api/async/api.d.ts +20 -5
- package/dist/api/async/api.d.ts.map +1 -1
- package/dist/api/async/api.js +45 -7
- package/dist/api/async/api.js.map +1 -1
- package/dist/api/node/node.generated.d.ts.map +1 -1
- package/dist/api/node/node.generated.js +2 -0
- package/dist/api/node/node.generated.js.map +1 -1
- package/dist/api/proto.generated.d.ts +4 -2
- package/dist/api/proto.generated.d.ts.map +1 -1
- package/dist/api/sync/api.d.ts +779 -203
- package/dist/api/sync/api.d.ts.map +1 -1
- package/dist/api/sync/api.js +2989 -1171
- package/dist/api/sync/api.js.map +1 -1
- package/dist/api/sync/client.d.ts +2 -1
- package/dist/api/sync/client.d.ts.map +1 -1
- package/dist/api/sync/client.js +3 -0
- package/dist/api/sync/client.js.map +1 -1
- package/dist/api/sync/generatorSupport.d.ts +17 -0
- package/dist/api/sync/generatorSupport.d.ts.map +1 -0
- package/dist/api/sync/generatorSupport.js +82 -0
- package/dist/api/sync/generatorSupport.js.map +1 -0
- package/dist/api/sync/types.d.ts +141 -35
- package/dist/api/sync/types.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/api/sync/api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { APIRequest as ProtocolRequest, APIResponse as ProtocolResponse } from "../proto.ts";
|
|
1
2
|
import { CheckFlags } from "#enums/checkFlags";
|
|
2
3
|
import { CompletionItemKind } from "#enums/completionItemKind";
|
|
3
4
|
import { DiagnosticCategory } from "#enums/diagnosticCategory";
|
|
@@ -14,7 +15,7 @@ import { TypeFormatFlags } from "#enums/typeFormatFlags";
|
|
|
14
15
|
import { TypePredicateKind } from "#enums/typePredicateKind";
|
|
15
16
|
import { type __String, type Declaration, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts";
|
|
16
17
|
import type { APIOptions, LSPConnectionOptions } from "../options.ts";
|
|
17
|
-
import type {
|
|
18
|
+
import type { CompilerOptions, Diagnostic, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ParsedCommandLine, ProjectReference, ProjectResponse, ReadConfigFileResponse, SignaturePropertyMethod, SignatureResponse, SourceFileMetadata, SymbolPropertyMethod, SymbolResponse, SymbolsPropertyMethod, TextEdit, TypeAcquisition, TypePropertyMethod, TypeResponse, TypesPropertyMethod, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts";
|
|
18
19
|
import { SourceFileCache } from "../sourceFileCache.ts";
|
|
19
20
|
import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts";
|
|
20
21
|
import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts";
|
|
@@ -33,6 +34,8 @@ export interface TranspileOutput {
|
|
|
33
34
|
diagnostics?: readonly Diagnostic[];
|
|
34
35
|
sourceMapText?: string;
|
|
35
36
|
}
|
|
37
|
+
export { all } from "./generatorSupport.ts";
|
|
38
|
+
import { type APIRequestGenerator, type ExecutedGeneratorsResults } from "./generatorSupport.ts";
|
|
36
39
|
export declare class API<FromLSP extends boolean = false> implements FormatDiagnosticsHost {
|
|
37
40
|
private client;
|
|
38
41
|
private sourceFileCache;
|
|
@@ -48,32 +51,72 @@ export declare class API<FromLSP extends boolean = false> implements FormatDiagn
|
|
|
48
51
|
* Create an API instance from an existing LSP connection's API session.
|
|
49
52
|
* Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
|
|
50
53
|
*/
|
|
51
|
-
static fromLSPConnection(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
static get fromLSPConnection(): {
|
|
55
|
+
(options: LSPConnectionOptions): API<true>;
|
|
56
|
+
gen(options: LSPConnectionOptions): Generator<ProtocolRequest, API<true>, ProtocolResponse["result"]>;
|
|
54
57
|
};
|
|
55
|
-
|
|
58
|
+
batch<T extends readonly APIRequestGenerator[]>(...requestGenerators: T): ExecutedGeneratorsResults<T>;
|
|
59
|
+
private get ensureInitialized();
|
|
56
60
|
getCurrentDirectory(): string;
|
|
57
61
|
getCanonicalFileName(fileName: string): string;
|
|
58
62
|
getNewLine(): string;
|
|
59
|
-
parseConfigFile(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
get parseConfigFile(): {
|
|
64
|
+
(file: DocumentIdentifier): ParsedCommandLine;
|
|
65
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, ParsedCommandLine, ProtocolResponse["result"]>;
|
|
66
|
+
};
|
|
67
|
+
get parseCommandLine(): {
|
|
68
|
+
(commandLine: readonly string[]): ParsedCommandLine;
|
|
69
|
+
gen(commandLine: readonly string[]): Generator<ProtocolRequest, ParsedCommandLine, ProtocolResponse["result"]>;
|
|
70
|
+
};
|
|
71
|
+
get readConfigFile(): {
|
|
72
|
+
(file: DocumentIdentifier): ReadConfigFileResponse;
|
|
73
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, ReadConfigFileResponse, ProtocolResponse["result"]>;
|
|
74
|
+
};
|
|
75
|
+
get parseJsonConfigFileContent(): {
|
|
76
|
+
(json: any, options: {
|
|
77
|
+
configDirectory: string;
|
|
78
|
+
configFileName?: never;
|
|
79
|
+
} | {
|
|
80
|
+
configFileName: DocumentIdentifier;
|
|
81
|
+
configDirectory?: never;
|
|
82
|
+
}): ParsedCommandLine;
|
|
83
|
+
gen(json: any, options: {
|
|
84
|
+
configDirectory: string;
|
|
85
|
+
configFileName?: never;
|
|
86
|
+
} | {
|
|
87
|
+
configFileName: DocumentIdentifier;
|
|
88
|
+
configDirectory?: never;
|
|
89
|
+
}): Generator<ProtocolRequest, ParsedCommandLine, ProtocolResponse["result"]>;
|
|
90
|
+
};
|
|
91
|
+
get transpileModule(): {
|
|
92
|
+
(input: string, options?: TranspileOptions): TranspileOutput;
|
|
93
|
+
gen(input: string, options?: TranspileOptions): Generator<ProtocolRequest, TranspileOutput, ProtocolResponse["result"]>;
|
|
94
|
+
};
|
|
95
|
+
get transpileModuleFromFile(): {
|
|
96
|
+
(fileName: string, options?: TranspileOptions): TranspileOutput;
|
|
97
|
+
gen(fileName: string, options?: TranspileOptions): Generator<ProtocolRequest, TranspileOutput, ProtocolResponse["result"]>;
|
|
98
|
+
};
|
|
99
|
+
get transpileDeclaration(): {
|
|
100
|
+
(input: string, options?: TranspileOptions): TranspileOutput;
|
|
101
|
+
gen(input: string, options?: TranspileOptions): Generator<ProtocolRequest, TranspileOutput, ProtocolResponse["result"]>;
|
|
102
|
+
};
|
|
103
|
+
get transpileDeclarationFromFile(): {
|
|
104
|
+
(fileName: string, options?: TranspileOptions): TranspileOutput;
|
|
105
|
+
gen(fileName: string, options?: TranspileOptions): Generator<ProtocolRequest, TranspileOutput, ProtocolResponse["result"]>;
|
|
106
|
+
};
|
|
107
|
+
get updateSnapshot(): {
|
|
108
|
+
(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Snapshot;
|
|
109
|
+
gen(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Generator<ProtocolRequest, Snapshot, ProtocolResponse["result"]>;
|
|
110
|
+
};
|
|
111
|
+
get close(): {
|
|
112
|
+
(): void;
|
|
113
|
+
gen(): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
114
|
+
};
|
|
75
115
|
clearSourceFileCache(): void;
|
|
76
|
-
runWithTemporaryFileUpdate(
|
|
116
|
+
get runWithTemporaryFileUpdate(): {
|
|
117
|
+
(baseSnapshot: Snapshot, file: DocumentIdentifier, newText: string, cb: (newSnapshot: Snapshot) => void): void;
|
|
118
|
+
gen(baseSnapshot: Snapshot, file: DocumentIdentifier, newText: string, cb: (newSnapshot: Snapshot) => void | Generator<ProtocolRequest, void, ProtocolResponse["result"]>): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
119
|
+
};
|
|
77
120
|
/**
|
|
78
121
|
* Returns a snapshot of collected timing information for requests made
|
|
79
122
|
* through this API instance: client-measured round-trip latency and bytes
|
|
@@ -85,18 +128,36 @@ export declare class API<FromLSP extends boolean = false> implements FormatDiagn
|
|
|
85
128
|
* `collectTiming` option; when it is not, the returned snapshot has
|
|
86
129
|
* `enabled: false` and zeroed totals.
|
|
87
130
|
*/
|
|
88
|
-
getTimingInfo():
|
|
131
|
+
get getTimingInfo(): {
|
|
132
|
+
(): TimingInfo;
|
|
133
|
+
gen(): Generator<ProtocolRequest, TimingInfo, ProtocolResponse["result"]>;
|
|
134
|
+
};
|
|
89
135
|
/** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
|
|
90
|
-
resetTimingInfo():
|
|
136
|
+
get resetTimingInfo(): {
|
|
137
|
+
(): void;
|
|
138
|
+
gen(): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
139
|
+
};
|
|
91
140
|
}
|
|
141
|
+
type EnsureInitialized = (() => void) & {
|
|
142
|
+
gen(): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
143
|
+
};
|
|
92
144
|
export declare class InternalAPI {
|
|
93
145
|
private client;
|
|
94
146
|
private ensureInitialized;
|
|
95
147
|
/** @internal */
|
|
96
|
-
constructor(client: Client, ensureInitialized:
|
|
97
|
-
startCPUProfile(
|
|
98
|
-
|
|
99
|
-
|
|
148
|
+
constructor(client: Client, ensureInitialized: EnsureInitialized);
|
|
149
|
+
get startCPUProfile(): {
|
|
150
|
+
(dir: string): void;
|
|
151
|
+
gen(dir: string): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
152
|
+
};
|
|
153
|
+
get stopCPUProfile(): {
|
|
154
|
+
(): string;
|
|
155
|
+
gen(): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
156
|
+
};
|
|
157
|
+
get saveHeapProfile(): {
|
|
158
|
+
(dir: string): string;
|
|
159
|
+
gen(dir: string): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
160
|
+
};
|
|
100
161
|
}
|
|
101
162
|
export declare class Snapshot {
|
|
102
163
|
readonly id: number;
|
|
@@ -110,9 +171,15 @@ export declare class Snapshot {
|
|
|
110
171
|
constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, formatDiagnosticsHost: FormatDiagnosticsHost, onDispose: () => void);
|
|
111
172
|
getProjects(): readonly Project[];
|
|
112
173
|
getProject(configFileName: string): Project | undefined;
|
|
113
|
-
getDefaultProjectForFile(
|
|
174
|
+
get getDefaultProjectForFile(): {
|
|
175
|
+
(file: DocumentIdentifier): Project | undefined;
|
|
176
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, Project | undefined, ProtocolResponse["result"]>;
|
|
177
|
+
};
|
|
114
178
|
[globalThis.Symbol.dispose](): void;
|
|
115
|
-
dispose():
|
|
179
|
+
get dispose(): {
|
|
180
|
+
(): void;
|
|
181
|
+
gen(): Generator<ProtocolRequest, void, ProtocolResponse["result"]>;
|
|
182
|
+
};
|
|
116
183
|
isDisposed(): boolean;
|
|
117
184
|
private ensureNotDisposed;
|
|
118
185
|
}
|
|
@@ -127,8 +194,14 @@ declare class SnapshotObjectRegistry {
|
|
|
127
194
|
getOrCreateSymbol(data: SymbolResponse): Symbol;
|
|
128
195
|
getSymbol(id: number): Symbol | undefined;
|
|
129
196
|
clear(): void;
|
|
130
|
-
fetchSymbol(
|
|
131
|
-
|
|
197
|
+
get fetchSymbol(): {
|
|
198
|
+
(source: Symbol | Signature | Type, method: SymbolPropertyMethod, handle: number | undefined, projectId: Path): Symbol;
|
|
199
|
+
gen(source: Symbol | Signature | Type, method: SymbolPropertyMethod, handle: number | undefined, projectId: Path): Generator<ProtocolRequest, Symbol, ProtocolResponse["result"]>;
|
|
200
|
+
};
|
|
201
|
+
get fetchSymbols(): {
|
|
202
|
+
(source: Symbol | Signature | Type, method: SymbolsPropertyMethod, handles: readonly number[] | undefined, projectId: Path): readonly Symbol[];
|
|
203
|
+
gen(source: Symbol | Signature | Type, method: SymbolsPropertyMethod, handles: readonly number[] | undefined, projectId: Path): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
204
|
+
};
|
|
132
205
|
}
|
|
133
206
|
declare class ProjectObjectRegistry {
|
|
134
207
|
private client;
|
|
@@ -145,19 +218,58 @@ declare class ProjectObjectRegistry {
|
|
|
145
218
|
getOrCreateSignature(data: SignatureResponse): Signature;
|
|
146
219
|
getSignature(id: number): Signature | undefined;
|
|
147
220
|
clear(): void;
|
|
148
|
-
fetchOptionalType
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
221
|
+
get fetchOptionalType(): {
|
|
222
|
+
<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): T | undefined;
|
|
223
|
+
gen<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): Generator<ProtocolRequest, T | undefined, ProtocolResponse["result"]>;
|
|
224
|
+
};
|
|
225
|
+
get fetchType(): {
|
|
226
|
+
<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): T;
|
|
227
|
+
gen<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): Generator<ProtocolRequest, T, ProtocolResponse["result"]>;
|
|
228
|
+
};
|
|
229
|
+
get fetchSymbol(): {
|
|
230
|
+
(source: Symbol | Signature | Type, method: SymbolPropertyMethod, handle: number | undefined): Symbol;
|
|
231
|
+
gen(source: Symbol | Signature | Type, method: SymbolPropertyMethod, handle: number | undefined): Generator<ProtocolRequest, Symbol, ProtocolResponse["result"]>;
|
|
232
|
+
};
|
|
233
|
+
get fetchSignature(): {
|
|
234
|
+
(source: Symbol | Signature | Type, method: SignaturePropertyMethod, handle: number | undefined): Signature;
|
|
235
|
+
gen(source: Symbol | Signature | Type, method: SignaturePropertyMethod, handle: number | undefined): Generator<ProtocolRequest, Signature, ProtocolResponse["result"]>;
|
|
236
|
+
};
|
|
237
|
+
get fetchTypes(): {
|
|
238
|
+
(source: Symbol | Signature | Type, method: TypesPropertyMethod, handles?: readonly number[]): readonly Type[];
|
|
239
|
+
gen(source: Symbol | Signature | Type, method: TypesPropertyMethod, handles?: readonly number[]): Generator<ProtocolRequest, readonly Type[], ProtocolResponse["result"]>;
|
|
240
|
+
};
|
|
241
|
+
get fetchSymbols(): {
|
|
242
|
+
(source: Symbol | Signature | Type, method: SymbolsPropertyMethod, handles?: readonly number[]): readonly Symbol[];
|
|
243
|
+
gen(source: Symbol | Signature | Type, method: SymbolsPropertyMethod, handles?: readonly number[]): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
244
|
+
};
|
|
245
|
+
get fetchBaseTypes(): {
|
|
246
|
+
(source: Type): readonly Type[];
|
|
247
|
+
gen(source: Type): Generator<ProtocolRequest, readonly Type[], ProtocolResponse["result"]>;
|
|
248
|
+
};
|
|
249
|
+
get fetchPropertiesOfType(): {
|
|
250
|
+
(source: Type): readonly Symbol[];
|
|
251
|
+
gen(source: Type): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
252
|
+
};
|
|
253
|
+
get fetchApparentPropertiesOfType(): {
|
|
254
|
+
(source: Type): readonly Symbol[];
|
|
255
|
+
gen(source: Type): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
256
|
+
};
|
|
257
|
+
get fetchPropertyOfType(): {
|
|
258
|
+
(source: Type, name: string): Symbol | undefined;
|
|
259
|
+
gen(source: Type, name: string): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
260
|
+
};
|
|
261
|
+
get fetchSignaturesOfType(): {
|
|
262
|
+
(source: Type, kind: SignatureKind): readonly Signature[];
|
|
263
|
+
gen(source: Type, kind: SignatureKind): Generator<ProtocolRequest, readonly Signature[], ProtocolResponse["result"]>;
|
|
264
|
+
};
|
|
265
|
+
get fetchIndexInfosOfType(): {
|
|
266
|
+
(source: Type): readonly IndexInfo[];
|
|
267
|
+
gen(source: Type): Generator<ProtocolRequest, readonly IndexInfo[], ProtocolResponse["result"]>;
|
|
268
|
+
};
|
|
269
|
+
get fetchTypeParameterAtPosition(): {
|
|
270
|
+
(source: Signature, pos: number): Type;
|
|
271
|
+
gen(source: Signature, pos: number): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
272
|
+
};
|
|
161
273
|
}
|
|
162
274
|
export declare class Project {
|
|
163
275
|
readonly id: Path;
|
|
@@ -176,9 +288,15 @@ export declare class Project {
|
|
|
176
288
|
private snapshotId;
|
|
177
289
|
constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, formatDiagnosticsHost: FormatDiagnosticsHost, snapshotRegistry: SnapshotObjectRegistry);
|
|
178
290
|
/** @deprecated Use `languageService.getImportAdderEdits`. */
|
|
179
|
-
getImportAdderEdits(
|
|
291
|
+
get getImportAdderEdits(): {
|
|
292
|
+
(file: DocumentIdentifier, actions: readonly APIImportAdderAction[]): readonly TextEdit[];
|
|
293
|
+
gen(file: DocumentIdentifier, actions: readonly APIImportAdderAction[]): Generator<ProtocolRequest, readonly TextEdit[], ProtocolResponse["result"]>;
|
|
294
|
+
};
|
|
180
295
|
/** @deprecated Use `languageService.getImportEditsForSymbols`. */
|
|
181
|
-
getImportEditsForSymbols(
|
|
296
|
+
get getImportEditsForSymbols(): {
|
|
297
|
+
(file: DocumentIdentifier, symbols: readonly Symbol[], options?: GetImportEditsForSymbolsOptions): readonly TextEdit[];
|
|
298
|
+
gen(file: DocumentIdentifier, symbols: readonly Symbol[], options?: GetImportEditsForSymbolsOptions): Generator<ProtocolRequest, readonly TextEdit[], ProtocolResponse["result"]>;
|
|
299
|
+
};
|
|
182
300
|
dispose(): void;
|
|
183
301
|
}
|
|
184
302
|
export declare class LanguageService {
|
|
@@ -187,11 +305,26 @@ export declare class LanguageService {
|
|
|
187
305
|
private client;
|
|
188
306
|
private objectRegistry;
|
|
189
307
|
constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry);
|
|
190
|
-
getImportAdderEdits(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
308
|
+
get getImportAdderEdits(): {
|
|
309
|
+
(file: DocumentIdentifier, actions: readonly APIImportAdderAction[]): readonly TextEdit[];
|
|
310
|
+
gen(file: DocumentIdentifier, actions: readonly APIImportAdderAction[]): Generator<ProtocolRequest, readonly TextEdit[], ProtocolResponse["result"]>;
|
|
311
|
+
};
|
|
312
|
+
get getImportEditsForSymbols(): {
|
|
313
|
+
(file: DocumentIdentifier, symbols: readonly Symbol[], options?: GetImportEditsForSymbolsOptions): readonly TextEdit[];
|
|
314
|
+
gen(file: DocumentIdentifier, symbols: readonly Symbol[], options?: GetImportEditsForSymbolsOptions): Generator<ProtocolRequest, readonly TextEdit[], ProtocolResponse["result"]>;
|
|
315
|
+
};
|
|
316
|
+
get getReferencedSymbolsForNode(): {
|
|
317
|
+
(node: Node, position: number): ReferencedSymbolEntry[];
|
|
318
|
+
gen(node: Node, position: number): Generator<ProtocolRequest, ReferencedSymbolEntry[], ProtocolResponse["result"]>;
|
|
319
|
+
};
|
|
320
|
+
get getSignatureUsage(): {
|
|
321
|
+
(signatureDecl: Node): SignatureUsage[];
|
|
322
|
+
gen(signatureDecl: Node): Generator<ProtocolRequest, SignatureUsage[], ProtocolResponse["result"]>;
|
|
323
|
+
};
|
|
324
|
+
get getCompletionsAtPosition(): {
|
|
325
|
+
(document: string, position: number, options?: CompletionOptions): CompletionInfo | undefined;
|
|
326
|
+
gen(document: string, position: number, options?: CompletionOptions): Generator<ProtocolRequest, CompletionInfo | undefined, ProtocolResponse["result"]>;
|
|
327
|
+
};
|
|
195
328
|
}
|
|
196
329
|
export declare class Program implements FormatDiagnosticsHost {
|
|
197
330
|
private snapshotId;
|
|
@@ -207,100 +340,160 @@ export declare class Program implements FormatDiagnosticsHost {
|
|
|
207
340
|
getCanonicalFileName(fileName: string): string;
|
|
208
341
|
getNewLine(): string;
|
|
209
342
|
getCompilerOptions(): CompilerOptions;
|
|
210
|
-
getSourceFile(
|
|
211
|
-
|
|
343
|
+
get getSourceFile(): {
|
|
344
|
+
(file: DocumentIdentifier): SourceFile | undefined;
|
|
345
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, SourceFile | undefined, ProtocolResponse["result"]>;
|
|
346
|
+
};
|
|
347
|
+
get getSourceFileNames(): {
|
|
348
|
+
(): readonly string[];
|
|
349
|
+
gen(): Generator<ProtocolRequest, readonly string[], ProtocolResponse["result"]>;
|
|
350
|
+
};
|
|
212
351
|
/**
|
|
213
352
|
* Returns program-stored metadata for the given source file, or `undefined` if the file
|
|
214
353
|
* is not part of the program. Metadata is fetched lazily per file and cached on this
|
|
215
354
|
* `Program` instance.
|
|
216
355
|
*/
|
|
217
|
-
getSourceFileMetadata(
|
|
356
|
+
get getSourceFileMetadata(): {
|
|
357
|
+
(fileName: string): SourceFileMetadata | undefined;
|
|
358
|
+
gen(fileName: string): Generator<ProtocolRequest, SourceFileMetadata | undefined, ProtocolResponse["result"]>;
|
|
359
|
+
};
|
|
218
360
|
/**
|
|
219
361
|
* Returns program-stored metadata for the source file at the given path, or `undefined`
|
|
220
362
|
* if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
|
|
221
363
|
* the file name to path conversion. Metadata is fetched lazily per file and cached on
|
|
222
364
|
* this `Program` instance.
|
|
223
365
|
*/
|
|
224
|
-
getSourceFileMetadataByPath(
|
|
225
|
-
|
|
366
|
+
get getSourceFileMetadataByPath(): {
|
|
367
|
+
(path: Path): SourceFileMetadata | undefined;
|
|
368
|
+
gen(path: Path): Generator<ProtocolRequest, SourceFileMetadata | undefined, ProtocolResponse["result"]>;
|
|
369
|
+
};
|
|
370
|
+
private get fetchSourceFileMetadata();
|
|
226
371
|
/**
|
|
227
372
|
* Returns whether the given source file was loaded as part of an external library
|
|
228
373
|
* (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
|
|
229
374
|
* fetched lazily per file and cached on this `Program` instance.
|
|
230
375
|
*/
|
|
231
|
-
isSourceFileFromExternalLibrary(
|
|
376
|
+
get isSourceFileFromExternalLibrary(): {
|
|
377
|
+
(file: SourceFile): boolean;
|
|
378
|
+
gen(file: SourceFile): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
379
|
+
};
|
|
232
380
|
/**
|
|
233
381
|
* Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
|
|
234
382
|
* The underlying program metadata is fetched lazily per file and cached on this
|
|
235
383
|
* `Program` instance.
|
|
236
384
|
*/
|
|
237
|
-
isSourceFileDefaultLibrary(
|
|
385
|
+
get isSourceFileDefaultLibrary(): {
|
|
386
|
+
(file: SourceFile): boolean;
|
|
387
|
+
gen(file: SourceFile): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
388
|
+
};
|
|
238
389
|
/**
|
|
239
390
|
* Get all config source file names associated with this program's project config.
|
|
240
391
|
* Includes the root config file and any extended config files.
|
|
241
392
|
*/
|
|
242
|
-
getConfigFileNames():
|
|
393
|
+
get getConfigFileNames(): {
|
|
394
|
+
(): readonly string[];
|
|
395
|
+
gen(): Generator<ProtocolRequest, readonly string[], ProtocolResponse["result"]>;
|
|
396
|
+
};
|
|
243
397
|
/**
|
|
244
398
|
* Get a config source file by file name/URI.
|
|
245
399
|
* This can return the project's root tsconfig file or one of its extended config files.
|
|
246
400
|
*/
|
|
247
|
-
getConfigSourceFile(
|
|
401
|
+
get getConfigSourceFile(): {
|
|
402
|
+
(file: DocumentIdentifier): SourceFile | undefined;
|
|
403
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, SourceFile | undefined, ProtocolResponse["result"]>;
|
|
404
|
+
};
|
|
248
405
|
/**
|
|
249
406
|
* Get syntactic (parse) diagnostics for specific files or all files.
|
|
250
407
|
* @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
|
|
251
408
|
*/
|
|
252
|
-
getSyntacticDiagnostics(
|
|
409
|
+
get getSyntacticDiagnostics(): {
|
|
410
|
+
(file?: DocumentIdentifier | readonly DocumentIdentifier[]): readonly Diagnostic[];
|
|
411
|
+
gen(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
412
|
+
};
|
|
253
413
|
/**
|
|
254
414
|
* Get binder diagnostics for specific files or all files.
|
|
255
415
|
* @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
|
|
256
416
|
*/
|
|
257
|
-
getBindDiagnostics(
|
|
417
|
+
get getBindDiagnostics(): {
|
|
418
|
+
(file?: DocumentIdentifier | readonly DocumentIdentifier[]): readonly Diagnostic[];
|
|
419
|
+
gen(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
420
|
+
};
|
|
258
421
|
/**
|
|
259
422
|
* Get semantic (type-check) diagnostics for specific files or all files.
|
|
260
423
|
* @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
|
|
261
424
|
*/
|
|
262
|
-
getSemanticDiagnostics(
|
|
425
|
+
get getSemanticDiagnostics(): {
|
|
426
|
+
(file?: DocumentIdentifier | readonly DocumentIdentifier[]): readonly Diagnostic[];
|
|
427
|
+
gen(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
428
|
+
};
|
|
263
429
|
/**
|
|
264
430
|
* Get suggestion diagnostics for specific files or all files.
|
|
265
431
|
* @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
|
|
266
432
|
*/
|
|
267
|
-
getSuggestionDiagnostics(
|
|
433
|
+
get getSuggestionDiagnostics(): {
|
|
434
|
+
(file?: DocumentIdentifier | readonly DocumentIdentifier[]): readonly Diagnostic[];
|
|
435
|
+
gen(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
436
|
+
};
|
|
268
437
|
/**
|
|
269
438
|
* Get declaration emit diagnostics for specific files or all files.
|
|
270
439
|
* @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
|
|
271
440
|
*/
|
|
272
|
-
getDeclarationDiagnostics(
|
|
441
|
+
get getDeclarationDiagnostics(): {
|
|
442
|
+
(file?: DocumentIdentifier | readonly DocumentIdentifier[]): readonly Diagnostic[];
|
|
443
|
+
gen(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
444
|
+
};
|
|
273
445
|
/**
|
|
274
446
|
* Get program-wide diagnostics for the project, including compiler options diagnostics.
|
|
275
447
|
*/
|
|
276
|
-
getProgramDiagnostics():
|
|
448
|
+
get getProgramDiagnostics(): {
|
|
449
|
+
(): readonly Diagnostic[];
|
|
450
|
+
gen(): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
451
|
+
};
|
|
277
452
|
/**
|
|
278
453
|
* Get global (non-file-specific) semantic diagnostics for the project.
|
|
279
454
|
*/
|
|
280
|
-
getGlobalDiagnostics():
|
|
455
|
+
get getGlobalDiagnostics(): {
|
|
456
|
+
(): readonly Diagnostic[];
|
|
457
|
+
gen(): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
458
|
+
};
|
|
281
459
|
/**
|
|
282
460
|
* Get config file parsing diagnostics for the project.
|
|
283
461
|
*/
|
|
284
|
-
getConfigFileParsingDiagnostics():
|
|
462
|
+
get getConfigFileParsingDiagnostics(): {
|
|
463
|
+
(): readonly Diagnostic[];
|
|
464
|
+
gen(): Generator<ProtocolRequest, readonly Diagnostic[], ProtocolResponse["result"]>;
|
|
465
|
+
};
|
|
285
466
|
/**
|
|
286
467
|
* Emits files to the configured filesystem.
|
|
287
468
|
*
|
|
288
469
|
* When the API has a virtual filesystem with a `writeFile` callback, output
|
|
289
470
|
* is written there. Otherwise, the server writes directly to the host filesystem.
|
|
290
471
|
*/
|
|
291
|
-
emit(
|
|
472
|
+
get emit(): {
|
|
473
|
+
(emitOnly?: EmitOnly): EmitResult;
|
|
474
|
+
gen(emitOnly?: EmitOnly): Generator<ProtocolRequest, EmitResult, ProtocolResponse["result"]>;
|
|
475
|
+
};
|
|
292
476
|
/**
|
|
293
477
|
* Emits files and returns their contents without writing to the filesystem.
|
|
294
478
|
*/
|
|
295
|
-
emitToString(
|
|
479
|
+
get emitToString(): {
|
|
480
|
+
(emitOnly?: EmitOnly): EmitOutput;
|
|
481
|
+
gen(emitOnly?: EmitOnly): Generator<ProtocolRequest, EmitOutput, ProtocolResponse["result"]>;
|
|
482
|
+
};
|
|
296
483
|
/**
|
|
297
484
|
* Gets JavaScript output for selected files regardless of project `noEmit`, `emitDeclarationOnly`, and `noEmitOnError` settings.
|
|
298
485
|
*/
|
|
299
|
-
getJavaScriptEmit(
|
|
486
|
+
get getJavaScriptEmit(): {
|
|
487
|
+
(files: readonly DocumentIdentifier[]): EmitOutput;
|
|
488
|
+
gen(files: readonly DocumentIdentifier[]): Generator<ProtocolRequest, EmitOutput, ProtocolResponse["result"]>;
|
|
489
|
+
};
|
|
300
490
|
/**
|
|
301
491
|
* Gets declaration output for selected files regardless of project `noEmit`, `declaration`, `emitDeclarationOnly`, and `noEmitOnError` settings.
|
|
302
492
|
*/
|
|
303
|
-
getDeclarationEmit(
|
|
493
|
+
get getDeclarationEmit(): {
|
|
494
|
+
(files: readonly DocumentIdentifier[]): EmitOutput;
|
|
495
|
+
gen(files: readonly DocumentIdentifier[]): Generator<ProtocolRequest, EmitOutput, ProtocolResponse["result"]>;
|
|
496
|
+
};
|
|
304
497
|
}
|
|
305
498
|
export declare class Checker {
|
|
306
499
|
private snapshotId;
|
|
@@ -311,187 +504,432 @@ export declare class Checker {
|
|
|
311
504
|
private wellKnownSignatures;
|
|
312
505
|
constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry);
|
|
313
506
|
dispose(): void;
|
|
314
|
-
getSymbolAtLocation(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
507
|
+
get getSymbolAtLocation(): {
|
|
508
|
+
(node: Node): Symbol | undefined;
|
|
509
|
+
(nodes: readonly Node[]): (Symbol | undefined)[];
|
|
510
|
+
gen(node: Node): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
511
|
+
gen(nodes: readonly Node[]): Generator<ProtocolRequest, (Symbol | undefined)[], ProtocolResponse["result"]>;
|
|
512
|
+
};
|
|
513
|
+
get getSymbolAtPosition(): {
|
|
514
|
+
(file: DocumentIdentifier, position: number): Symbol | undefined;
|
|
515
|
+
(file: DocumentIdentifier, positions: readonly number[]): (Symbol | undefined)[];
|
|
516
|
+
gen(file: DocumentIdentifier, position: number): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
517
|
+
gen(file: DocumentIdentifier, positions: readonly number[]): Generator<ProtocolRequest, (Symbol | undefined)[], ProtocolResponse["result"]>;
|
|
518
|
+
};
|
|
519
|
+
get getSymbolOfSourceFile(): {
|
|
520
|
+
(file: DocumentIdentifier): Symbol | undefined;
|
|
521
|
+
(files: readonly DocumentIdentifier[]): (Symbol | undefined)[];
|
|
522
|
+
gen(file: DocumentIdentifier): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
523
|
+
gen(files: readonly DocumentIdentifier[]): Generator<ProtocolRequest, (Symbol | undefined)[], ProtocolResponse["result"]>;
|
|
524
|
+
};
|
|
320
525
|
/**
|
|
321
526
|
* Get the type of a symbol. Always returns a type; for symbols whose type
|
|
322
527
|
* cannot be determined the checker yields the error type (use
|
|
323
528
|
* {@link Type.isErrorType} to detect it).
|
|
324
529
|
*/
|
|
325
|
-
getTypeOfSymbol(
|
|
326
|
-
|
|
530
|
+
get getTypeOfSymbol(): {
|
|
531
|
+
(symbol: Symbol): Type;
|
|
532
|
+
(symbols: readonly Symbol[]): Type[];
|
|
533
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
534
|
+
gen(symbols: readonly Symbol[]): Generator<ProtocolRequest, Type[], ProtocolResponse["result"]>;
|
|
535
|
+
};
|
|
327
536
|
/**
|
|
328
537
|
* Get the declared type of a symbol. Always returns a type; for symbols whose
|
|
329
538
|
* declared type cannot be determined the checker yields the error type (use
|
|
330
539
|
* {@link Type.isErrorType} to detect it).
|
|
331
540
|
*/
|
|
332
|
-
getDeclaredTypeOfSymbol(
|
|
333
|
-
|
|
541
|
+
get getDeclaredTypeOfSymbol(): {
|
|
542
|
+
(symbol: Symbol): Type;
|
|
543
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Get the type of a symbol, excluding the missing type when
|
|
547
|
+
* `exactOptionalPropertyTypes: true` is set; for symbols whose
|
|
548
|
+
* type cannot be determined the checker yields the error type
|
|
549
|
+
* (use {@link Type.isErrorType} to detect it).
|
|
550
|
+
*/
|
|
551
|
+
get getNonMissingTypeOfSymbol(): {
|
|
552
|
+
(symbol: Symbol): Type;
|
|
553
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
554
|
+
};
|
|
555
|
+
get getReferencesToSymbolInFile(): {
|
|
556
|
+
(file: DocumentIdentifier, symbol: Symbol): NodeHandle[];
|
|
557
|
+
gen(file: DocumentIdentifier, symbol: Symbol): Generator<ProtocolRequest, NodeHandle[], ProtocolResponse["result"]>;
|
|
558
|
+
};
|
|
334
559
|
/** @deprecated Use `project.languageService.getReferencedSymbolsForNode`. */
|
|
335
|
-
getReferencedSymbolsForNode(
|
|
560
|
+
get getReferencedSymbolsForNode(): {
|
|
561
|
+
(node: Node, position: number): ReferencedSymbolEntry[];
|
|
562
|
+
gen(node: Node, position: number): Generator<ProtocolRequest, ReferencedSymbolEntry[], ProtocolResponse["result"]>;
|
|
563
|
+
};
|
|
336
564
|
/** @deprecated Use `project.languageService.getSignatureUsage`. */
|
|
337
|
-
getSignatureUsage(
|
|
565
|
+
get getSignatureUsage(): {
|
|
566
|
+
(signatureDecl: Node): SignatureUsage[];
|
|
567
|
+
gen(signatureDecl: Node): Generator<ProtocolRequest, SignatureUsage[], ProtocolResponse["result"]>;
|
|
568
|
+
};
|
|
338
569
|
/** @deprecated Use `project.languageService.getCompletionsAtPosition`. */
|
|
339
|
-
getCompletionsAtPosition(
|
|
570
|
+
get getCompletionsAtPosition(): {
|
|
571
|
+
(document: string, position: number, options?: CompletionOptions): CompletionInfo | undefined;
|
|
572
|
+
gen(document: string, position: number, options?: CompletionOptions): Generator<ProtocolRequest, CompletionInfo | undefined, ProtocolResponse["result"]>;
|
|
573
|
+
};
|
|
340
574
|
/**
|
|
341
575
|
* Get the type at a node location. Always returns a type; for nodes whose
|
|
342
576
|
* type cannot be determined the checker yields the error type (use
|
|
343
577
|
* {@link Type.isErrorType} to detect it).
|
|
344
578
|
*/
|
|
345
|
-
getTypeAtLocation(
|
|
346
|
-
|
|
347
|
-
|
|
579
|
+
get getTypeAtLocation(): {
|
|
580
|
+
(node: Node): Type;
|
|
581
|
+
(nodes: readonly Node[]): Type[];
|
|
582
|
+
gen(node: Node): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
583
|
+
gen(nodes: readonly Node[]): Generator<ProtocolRequest, Type[], ProtocolResponse["result"]>;
|
|
584
|
+
};
|
|
585
|
+
get getSignaturesOfType(): {
|
|
586
|
+
(type: Type, kind: SignatureKind): readonly Signature[];
|
|
587
|
+
gen(type: Type, kind: SignatureKind): Generator<ProtocolRequest, readonly Signature[], ProtocolResponse["result"]>;
|
|
588
|
+
};
|
|
348
589
|
/**
|
|
349
590
|
* Get the resolved signature of a call-like expression. Always returns a
|
|
350
591
|
* signature; when a call cannot be resolved the checker yields the unknown
|
|
351
592
|
* signature (use {@link Checker.isUnknownSignature} to detect it).
|
|
352
593
|
*/
|
|
353
|
-
getResolvedSignature(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
594
|
+
get getResolvedSignature(): {
|
|
595
|
+
(node: Node): Signature;
|
|
596
|
+
gen(node: Node): Generator<ProtocolRequest, Signature, ProtocolResponse["result"]>;
|
|
597
|
+
};
|
|
598
|
+
get getTypeAtPosition(): {
|
|
599
|
+
(file: DocumentIdentifier, position: number): Type | undefined;
|
|
600
|
+
(file: DocumentIdentifier, positions: readonly number[]): (Type | undefined)[];
|
|
601
|
+
gen(file: DocumentIdentifier, position: number): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
602
|
+
gen(file: DocumentIdentifier, positions: readonly number[]): Generator<ProtocolRequest, (Type | undefined)[], ProtocolResponse["result"]>;
|
|
603
|
+
};
|
|
604
|
+
get resolveName(): {
|
|
605
|
+
(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Symbol | undefined;
|
|
606
|
+
gen(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
607
|
+
};
|
|
357
608
|
/**
|
|
358
609
|
* Returns all symbols with the given meaning that are visible at `location`.
|
|
359
610
|
*/
|
|
360
|
-
getSymbolsInScope(
|
|
361
|
-
|
|
362
|
-
|
|
611
|
+
get getSymbolsInScope(): {
|
|
612
|
+
(location: Node | DocumentPosition, meaning: SymbolFlags): readonly Symbol[];
|
|
613
|
+
gen(location: Node | DocumentPosition, meaning: SymbolFlags): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
614
|
+
};
|
|
615
|
+
get getResolvedSymbol(): {
|
|
616
|
+
(node: Identifier): Symbol | undefined;
|
|
617
|
+
gen(node: Identifier): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
618
|
+
};
|
|
619
|
+
get getContextualType(): {
|
|
620
|
+
(node: Expression): Type | undefined;
|
|
621
|
+
gen(node: Expression): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
622
|
+
};
|
|
363
623
|
/** Get the base type of a literal type (e.g. `number` for `42`). Always returns a type. */
|
|
364
|
-
getBaseTypeOfLiteralType(
|
|
624
|
+
get getBaseTypeOfLiteralType(): {
|
|
625
|
+
(type: Type): Type;
|
|
626
|
+
gen(type: Type): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
627
|
+
};
|
|
365
628
|
/** Get the type with `null` and `undefined` removed. Always returns a type. */
|
|
366
|
-
getNonNullableType(
|
|
629
|
+
get getNonNullableType(): {
|
|
630
|
+
(type: Type): Type;
|
|
631
|
+
gen(type: Type): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
632
|
+
};
|
|
367
633
|
/**
|
|
368
634
|
* Get the type for a type node. Always returns a type; for type nodes whose
|
|
369
635
|
* type cannot be determined the checker yields the error type (use
|
|
370
636
|
* {@link Type.isErrorType} to detect it).
|
|
371
637
|
*/
|
|
372
|
-
getTypeFromTypeNode(
|
|
638
|
+
get getTypeFromTypeNode(): {
|
|
639
|
+
(node: TypeNode): Type;
|
|
640
|
+
gen(node: TypeNode): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
641
|
+
};
|
|
373
642
|
/** Get the widened type. Always returns a type. */
|
|
374
|
-
getWidenedType(
|
|
643
|
+
get getWidenedType(): {
|
|
644
|
+
(type: Type): Type;
|
|
645
|
+
gen(type: Type): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
646
|
+
};
|
|
375
647
|
/**
|
|
376
648
|
* Get the type of the parameter at the given index in a signature. Always
|
|
377
649
|
* returns a type; an out-of-range index yields the `any` type.
|
|
378
650
|
*/
|
|
379
|
-
getParameterType(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
651
|
+
get getParameterType(): {
|
|
652
|
+
(signature: Signature, index: number): Type;
|
|
653
|
+
gen(signature: Signature, index: number): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
654
|
+
};
|
|
655
|
+
get isArrayLikeType(): {
|
|
656
|
+
(type: Type): boolean;
|
|
657
|
+
gen(type: Type): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
658
|
+
};
|
|
659
|
+
get isTypeAssignableTo(): {
|
|
660
|
+
(source: Type, target: Type): boolean;
|
|
661
|
+
gen(source: Type, target: Type): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
662
|
+
};
|
|
663
|
+
get getShorthandAssignmentValueSymbol(): {
|
|
664
|
+
(node: Node): Symbol | undefined;
|
|
665
|
+
gen(node: Node): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
666
|
+
};
|
|
383
667
|
/**
|
|
384
668
|
* Get the type of a symbol as narrowed at a specific location. Always returns
|
|
385
669
|
* a type; for symbols whose type cannot be determined the checker yields the
|
|
386
670
|
* error type (use {@link Type.isErrorType} to detect it).
|
|
387
671
|
*/
|
|
388
|
-
getTypeOfSymbolAtLocation(
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
672
|
+
get getTypeOfSymbolAtLocation(): {
|
|
673
|
+
(symbol: Symbol, location: Node): Type;
|
|
674
|
+
gen(symbol: Symbol, location: Node): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
675
|
+
};
|
|
676
|
+
private get getIntrinsicType();
|
|
677
|
+
get getAnyType(): {
|
|
678
|
+
(): Type;
|
|
679
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
680
|
+
};
|
|
681
|
+
get getStringType(): {
|
|
682
|
+
(): Type;
|
|
683
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
684
|
+
};
|
|
685
|
+
get getNumberType(): {
|
|
686
|
+
(): Type;
|
|
687
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
688
|
+
};
|
|
689
|
+
get getBooleanType(): {
|
|
690
|
+
(): Type;
|
|
691
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
692
|
+
};
|
|
693
|
+
get getVoidType(): {
|
|
694
|
+
(): Type;
|
|
695
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
696
|
+
};
|
|
697
|
+
get getUndefinedType(): {
|
|
698
|
+
(): Type;
|
|
699
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
700
|
+
};
|
|
701
|
+
get getNullType(): {
|
|
702
|
+
(): Type;
|
|
703
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
704
|
+
};
|
|
705
|
+
get getNeverType(): {
|
|
706
|
+
(): Type;
|
|
707
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
708
|
+
};
|
|
709
|
+
get getUnknownType(): {
|
|
710
|
+
(): Type;
|
|
711
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
712
|
+
};
|
|
713
|
+
get getBigIntType(): {
|
|
714
|
+
(): Type;
|
|
715
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
716
|
+
};
|
|
717
|
+
get getESSymbolType(): {
|
|
718
|
+
(): Type;
|
|
719
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
720
|
+
};
|
|
721
|
+
get getNonPrimitiveType(): {
|
|
722
|
+
(): Type;
|
|
723
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
724
|
+
};
|
|
725
|
+
get typeToTypeNode(): {
|
|
726
|
+
(type: Type, enclosingDeclaration?: Node, flags?: number): TypeNode | undefined;
|
|
727
|
+
gen(type: Type, enclosingDeclaration?: Node, flags?: number): Generator<ProtocolRequest, TypeNode | undefined, ProtocolResponse["result"]>;
|
|
728
|
+
};
|
|
729
|
+
get signatureToSignatureDeclaration(): {
|
|
730
|
+
(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Node | undefined;
|
|
731
|
+
gen(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Generator<ProtocolRequest, Node | undefined, ProtocolResponse["result"]>;
|
|
732
|
+
};
|
|
733
|
+
get typeToString(): {
|
|
734
|
+
(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
|
735
|
+
gen(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
736
|
+
};
|
|
737
|
+
get isContextSensitive(): {
|
|
738
|
+
(node: Node): boolean;
|
|
739
|
+
gen(node: Node): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
740
|
+
};
|
|
741
|
+
get isArrayType(): {
|
|
742
|
+
(type: Type): boolean;
|
|
743
|
+
gen(type: Type): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
744
|
+
};
|
|
745
|
+
get isTupleType(): {
|
|
746
|
+
(type: Type): boolean;
|
|
747
|
+
gen(type: Type): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
748
|
+
};
|
|
749
|
+
/**
|
|
750
|
+
* The following symbols are considered read-only:
|
|
751
|
+
* - Properties with a `readonly` modifier
|
|
752
|
+
* - Variables declared with `const`
|
|
753
|
+
* - Get accessors without matching set accessors
|
|
754
|
+
* - Enum members
|
|
755
|
+
* - `Object.defineProperty` assignments with `writable: false` or no setter
|
|
756
|
+
* - Unions and intersections of the above
|
|
757
|
+
*/
|
|
758
|
+
get isReadonlySymbol(): {
|
|
759
|
+
(symbol: Symbol): boolean;
|
|
760
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
761
|
+
};
|
|
408
762
|
/** Get the return type of a signature. Always returns a type. */
|
|
409
|
-
getReturnTypeOfSignature(
|
|
763
|
+
get getReturnTypeOfSignature(): {
|
|
764
|
+
(signature: Signature): Type;
|
|
765
|
+
gen(signature: Signature): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
766
|
+
};
|
|
410
767
|
/**
|
|
411
768
|
* Get the rest type of a signature. Always returns a type; a signature with
|
|
412
769
|
* no rest parameter yields the `any` type.
|
|
413
770
|
*/
|
|
414
|
-
getRestTypeOfSignature(
|
|
415
|
-
|
|
771
|
+
get getRestTypeOfSignature(): {
|
|
772
|
+
(signature: Signature): Type;
|
|
773
|
+
gen(signature: Signature): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
774
|
+
};
|
|
775
|
+
get getTypePredicateOfSignature(): {
|
|
776
|
+
(signature: Signature): TypePredicate | undefined;
|
|
777
|
+
gen(signature: Signature): Generator<ProtocolRequest, TypePredicate | undefined, ProtocolResponse["result"]>;
|
|
778
|
+
};
|
|
416
779
|
/**
|
|
417
780
|
* Get the base types of a class or interface type. A type with no base types
|
|
418
781
|
* yields an empty array.
|
|
419
782
|
*/
|
|
420
|
-
getBaseTypes(
|
|
783
|
+
get getBaseTypes(): {
|
|
784
|
+
(type: InterfaceType): readonly Type[];
|
|
785
|
+
gen(type: InterfaceType): Generator<ProtocolRequest, readonly Type[], ProtocolResponse["result"]>;
|
|
786
|
+
};
|
|
421
787
|
/** Get the apparent type of a type. Always returns a type. */
|
|
422
|
-
getApparentType(
|
|
788
|
+
get getApparentType(): {
|
|
789
|
+
(type: Type): Type;
|
|
790
|
+
gen(type: Type): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
791
|
+
};
|
|
423
792
|
/** Get the reduced type of a type. Always returns a type. */
|
|
424
|
-
getReducedType(
|
|
425
|
-
|
|
426
|
-
|
|
793
|
+
get getReducedType(): {
|
|
794
|
+
(type: Type): Type;
|
|
795
|
+
gen(type: Type): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
796
|
+
};
|
|
797
|
+
get getPropertiesOfType(): {
|
|
798
|
+
(type: Type): readonly Symbol[];
|
|
799
|
+
gen(type: Type): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
800
|
+
};
|
|
801
|
+
get getIndexInfosOfType(): {
|
|
802
|
+
(type: Type): readonly IndexInfo[];
|
|
803
|
+
gen(type: Type): Generator<ProtocolRequest, readonly IndexInfo[], ProtocolResponse["result"]>;
|
|
804
|
+
};
|
|
427
805
|
/**
|
|
428
806
|
* Get the constraint of a type parameter (the `T` in `<U extends T>`), or
|
|
429
807
|
* undefined if it has none.
|
|
430
808
|
*/
|
|
431
|
-
getConstraintOfTypeParameter(
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
809
|
+
get getConstraintOfTypeParameter(): {
|
|
810
|
+
(type: TypeParameter): Type | undefined;
|
|
811
|
+
gen(type: TypeParameter): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
812
|
+
};
|
|
813
|
+
get getDefaultFromTypeParameter(): {
|
|
814
|
+
(type: TypeParameter): Type | undefined;
|
|
815
|
+
gen(type: TypeParameter): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
816
|
+
};
|
|
817
|
+
get getBaseConstraintOfType(): {
|
|
818
|
+
(type: Type): Type | undefined;
|
|
819
|
+
gen(type: Type): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
820
|
+
};
|
|
821
|
+
get getPropertyOfType(): {
|
|
822
|
+
(type: Type, name: string): Symbol | undefined;
|
|
823
|
+
gen(type: Type, name: string): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
824
|
+
};
|
|
825
|
+
get getConstantValue(): {
|
|
826
|
+
(node: Node): string | number | undefined;
|
|
827
|
+
gen(node: Node): Generator<ProtocolRequest, string | number | undefined, ProtocolResponse["result"]>;
|
|
828
|
+
};
|
|
436
829
|
/** Get the signature of a function-like declaration. Always returns a signature. */
|
|
437
|
-
getSignatureFromDeclaration(
|
|
438
|
-
|
|
830
|
+
get getSignatureFromDeclaration(): {
|
|
831
|
+
(node: Node): Signature;
|
|
832
|
+
gen(node: Node): Generator<ProtocolRequest, Signature, ProtocolResponse["result"]>;
|
|
833
|
+
};
|
|
834
|
+
get getExportSpecifierLocalTargetSymbol(): {
|
|
835
|
+
(node: Node): Symbol | undefined;
|
|
836
|
+
gen(node: Node): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
837
|
+
};
|
|
439
838
|
/**
|
|
440
839
|
* Follow all aliases to get the original symbol. Always returns a symbol; for
|
|
441
840
|
* an unresolved alias the checker yields the unknown symbol (use
|
|
442
841
|
* {@link Checker.isUnknownSymbol} to detect it).
|
|
443
842
|
*/
|
|
444
|
-
getAliasedSymbol(
|
|
843
|
+
get getAliasedSymbol(): {
|
|
844
|
+
(symbol: Symbol): Symbol;
|
|
845
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Symbol, ProtocolResponse["result"]>;
|
|
846
|
+
};
|
|
445
847
|
/**
|
|
446
848
|
* Get the fully qualified name of a symbol, walking up its parent chain
|
|
447
849
|
* (e.g. `"/path/to/module".Namespace.Name`).
|
|
448
850
|
*/
|
|
449
|
-
getFullyQualifiedName(
|
|
450
|
-
|
|
851
|
+
get getFullyQualifiedName(): {
|
|
852
|
+
(symbol: Symbol): string;
|
|
853
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
854
|
+
};
|
|
855
|
+
get getImmediateAliasedSymbol(): {
|
|
856
|
+
(symbol: Symbol): Symbol | undefined;
|
|
857
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
858
|
+
};
|
|
451
859
|
/**
|
|
452
860
|
* Get the target symbol if instantiated, or the provided symbol otherwise.
|
|
453
861
|
*/
|
|
454
|
-
getTargetSymbol(
|
|
862
|
+
get getTargetSymbol(): {
|
|
863
|
+
(symbol: Symbol): Symbol;
|
|
864
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, Symbol, ProtocolResponse["result"]>;
|
|
865
|
+
};
|
|
455
866
|
/**
|
|
456
867
|
* Fetch (once, then cache) the handle ids of the per-checker singleton
|
|
457
868
|
* symbols (unknown, undefined, arguments). These ids are stable for the life
|
|
458
869
|
* of the project's checker, so identity checks against them are local after
|
|
459
870
|
* the first call.
|
|
460
871
|
*/
|
|
461
|
-
private getWellKnownSymbols;
|
|
872
|
+
private get getWellKnownSymbols();
|
|
462
873
|
/**
|
|
463
874
|
* Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
|
|
464
875
|
* result of {@link Checker.getAliasedSymbol} on an unresolved alias).
|
|
465
876
|
*/
|
|
466
|
-
isUnknownSymbol(
|
|
877
|
+
get isUnknownSymbol(): {
|
|
878
|
+
(symbol: Symbol): boolean;
|
|
879
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
880
|
+
};
|
|
467
881
|
/**
|
|
468
882
|
* Returns `true` if the symbol is the checker's "undefined" symbol.
|
|
469
883
|
*/
|
|
470
|
-
isUndefinedSymbol(
|
|
884
|
+
get isUndefinedSymbol(): {
|
|
885
|
+
(symbol: Symbol): boolean;
|
|
886
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
887
|
+
};
|
|
471
888
|
/**
|
|
472
889
|
* Returns `true` if the symbol is the checker's "arguments" symbol.
|
|
473
890
|
*/
|
|
474
|
-
isArgumentsSymbol(
|
|
891
|
+
get isArgumentsSymbol(): {
|
|
892
|
+
(symbol: Symbol): boolean;
|
|
893
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
894
|
+
};
|
|
475
895
|
/**
|
|
476
896
|
* Fetch (once, then cache) the handle id of the per-checker unknown
|
|
477
897
|
* signature. This id is stable for the life of the project's checker, so
|
|
478
898
|
* identity checks against it are local after the first call.
|
|
479
899
|
*/
|
|
480
|
-
private getWellKnownSignatures;
|
|
900
|
+
private get getWellKnownSignatures();
|
|
481
901
|
/**
|
|
482
902
|
* Returns `true` if the signature is the checker's "unknown" signature (e.g.
|
|
483
903
|
* the result of {@link Checker.getResolvedSignature} on a call that cannot be
|
|
484
904
|
* resolved).
|
|
485
905
|
*/
|
|
486
|
-
isUnknownSignature(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
906
|
+
get isUnknownSignature(): {
|
|
907
|
+
(signature: Signature): boolean;
|
|
908
|
+
gen(signature: Signature): Generator<ProtocolRequest, boolean, ProtocolResponse["result"]>;
|
|
909
|
+
};
|
|
910
|
+
get getExportsOfModule(): {
|
|
911
|
+
(symbol: Symbol): readonly Symbol[];
|
|
912
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
913
|
+
};
|
|
914
|
+
get getMemberInModuleExports(): {
|
|
915
|
+
(symbol: Symbol, name: string): Symbol | undefined;
|
|
916
|
+
gen(symbol: Symbol, name: string): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
917
|
+
};
|
|
918
|
+
get getJsDocTagsOfSymbol(): {
|
|
919
|
+
(symbol: Symbol): readonly JSDocTagInfo[];
|
|
920
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, readonly JSDocTagInfo[], ProtocolResponse["result"]>;
|
|
921
|
+
};
|
|
922
|
+
get getDocumentationCommentOfSymbol(): {
|
|
923
|
+
(symbol: Symbol): string;
|
|
924
|
+
gen(symbol: Symbol): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
925
|
+
};
|
|
491
926
|
/**
|
|
492
927
|
* Get the type arguments of a type reference (e.g. the `string` in `Array<string>`).
|
|
493
928
|
*/
|
|
494
|
-
getTypeArguments(
|
|
929
|
+
get getTypeArguments(): {
|
|
930
|
+
(type: TypeReference): readonly Type[];
|
|
931
|
+
gen(type: TypeReference): Generator<ProtocolRequest, readonly Type[], ProtocolResponse["result"]>;
|
|
932
|
+
};
|
|
495
933
|
}
|
|
496
934
|
export interface PrintNodeOptions {
|
|
497
935
|
preserveSourceNewlines?: boolean | undefined;
|
|
@@ -501,7 +939,10 @@ export interface PrintNodeOptions {
|
|
|
501
939
|
export declare class Emitter {
|
|
502
940
|
private client;
|
|
503
941
|
constructor(client: Client);
|
|
504
|
-
printNode(
|
|
942
|
+
get printNode(): {
|
|
943
|
+
(node: Node, options?: PrintNodeOptions): string;
|
|
944
|
+
gen(node: Node, options?: PrintNodeOptions): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
945
|
+
};
|
|
505
946
|
}
|
|
506
947
|
export declare class SnapshotInternalAPI {
|
|
507
948
|
private snapshotId;
|
|
@@ -516,7 +957,10 @@ export declare class SnapshotInternalAPI {
|
|
|
516
957
|
* @param position The UTF-16 code-unit offset in the target file for insertion.
|
|
517
958
|
* @returns The formatted text of the node, indented for the insertion position.
|
|
518
959
|
*/
|
|
519
|
-
formatNodeForInsertion(
|
|
960
|
+
get formatNodeForInsertion(): {
|
|
961
|
+
(node: Node, file: DocumentIdentifier, position: number): string;
|
|
962
|
+
gen(node: Node, file: DocumentIdentifier, position: number): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
963
|
+
};
|
|
520
964
|
}
|
|
521
965
|
export declare class NodeHandle<out T extends Node = Node> {
|
|
522
966
|
/**
|
|
@@ -534,7 +978,10 @@ export declare class NodeHandle<out T extends Node = Node> {
|
|
|
534
978
|
* and looking up the node by index. If no project is passed, the project that produced
|
|
535
979
|
* the handle is used.
|
|
536
980
|
*/
|
|
537
|
-
resolve(
|
|
981
|
+
get resolve(): {
|
|
982
|
+
(project?: Project): T | undefined;
|
|
983
|
+
gen(project?: Project): Generator<ProtocolRequest, T | undefined, ProtocolResponse["result"]>;
|
|
984
|
+
};
|
|
538
985
|
}
|
|
539
986
|
/** A symbol definition paired with all of its reference nodes. */
|
|
540
987
|
export interface ReferencedSymbolEntry {
|
|
@@ -574,21 +1021,39 @@ export declare class Symbol {
|
|
|
574
1021
|
private membersCache;
|
|
575
1022
|
private exportsCache;
|
|
576
1023
|
constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry);
|
|
577
|
-
getParent():
|
|
1024
|
+
get getParent(): {
|
|
1025
|
+
(): Symbol | undefined;
|
|
1026
|
+
gen(): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
1027
|
+
};
|
|
578
1028
|
/**
|
|
579
1029
|
* Get this symbol's members keyed by escaped name. The result is cached on
|
|
580
1030
|
* the symbol, so repeated calls do not round-trip to the server.
|
|
581
1031
|
*/
|
|
582
|
-
getMembers():
|
|
1032
|
+
get getMembers(): {
|
|
1033
|
+
(): ReadonlyMap<__String, Symbol>;
|
|
1034
|
+
gen(): Generator<ProtocolRequest, ReadonlyMap<__String, Symbol>, ProtocolResponse["result"]>;
|
|
1035
|
+
};
|
|
583
1036
|
/**
|
|
584
1037
|
* Get this symbol's exports keyed by escaped name. The result is cached on
|
|
585
1038
|
* the symbol, so repeated calls do not round-trip to the server.
|
|
586
1039
|
*/
|
|
587
|
-
getExports():
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
1040
|
+
get getExports(): {
|
|
1041
|
+
(): ReadonlyMap<__String, Symbol>;
|
|
1042
|
+
gen(): Generator<ProtocolRequest, ReadonlyMap<__String, Symbol>, ProtocolResponse["result"]>;
|
|
1043
|
+
};
|
|
1044
|
+
private get fetchSymbolTable();
|
|
1045
|
+
get getExportSymbol(): {
|
|
1046
|
+
(): Symbol;
|
|
1047
|
+
gen(): Generator<ProtocolRequest, Symbol, ProtocolResponse["result"]>;
|
|
1048
|
+
};
|
|
1049
|
+
get getJsDocTags(): {
|
|
1050
|
+
(checker: Checker): readonly JSDocTagInfo[];
|
|
1051
|
+
gen(checker: Checker): Generator<ProtocolRequest, readonly JSDocTagInfo[], ProtocolResponse["result"]>;
|
|
1052
|
+
};
|
|
1053
|
+
get getDocumentationComment(): {
|
|
1054
|
+
(checker: Checker): string;
|
|
1055
|
+
gen(checker: Checker): Generator<ProtocolRequest, string, ProtocolResponse["result"]>;
|
|
1056
|
+
};
|
|
592
1057
|
}
|
|
593
1058
|
declare class TypeObject implements Type {
|
|
594
1059
|
private objectRegistry;
|
|
@@ -633,43 +1098,136 @@ declare class TypeObject implements Type {
|
|
|
633
1098
|
private stringIndexType;
|
|
634
1099
|
private numberIndexType;
|
|
635
1100
|
constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry);
|
|
636
|
-
getSymbol():
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
1101
|
+
get getSymbol(): {
|
|
1102
|
+
(): Symbol | undefined;
|
|
1103
|
+
gen(): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
1104
|
+
};
|
|
1105
|
+
get getProperties(): {
|
|
1106
|
+
(): readonly Symbol[];
|
|
1107
|
+
gen(): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
1108
|
+
};
|
|
1109
|
+
get getProperty(): {
|
|
1110
|
+
(propertyName: string): Symbol | undefined;
|
|
1111
|
+
gen(propertyName: string): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
1112
|
+
};
|
|
1113
|
+
get getApparentProperties(): {
|
|
1114
|
+
(): readonly Symbol[];
|
|
1115
|
+
gen(): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
1116
|
+
};
|
|
1117
|
+
get getCallSignatures(): {
|
|
1118
|
+
(): readonly Signature[];
|
|
1119
|
+
gen(): Generator<ProtocolRequest, readonly Signature[], ProtocolResponse["result"]>;
|
|
1120
|
+
};
|
|
1121
|
+
get getConstructSignatures(): {
|
|
1122
|
+
(): readonly Signature[];
|
|
1123
|
+
gen(): Generator<ProtocolRequest, readonly Signature[], ProtocolResponse["result"]>;
|
|
1124
|
+
};
|
|
1125
|
+
get getNonNullableType(): {
|
|
1126
|
+
(): Type;
|
|
1127
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1128
|
+
};
|
|
1129
|
+
get getStringIndexType(): {
|
|
1130
|
+
(): Type | undefined;
|
|
1131
|
+
gen(): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
1132
|
+
};
|
|
1133
|
+
private get getStringIndexTypeWorker();
|
|
1134
|
+
get getNumberIndexType(): {
|
|
1135
|
+
(): Type | undefined;
|
|
1136
|
+
gen(): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
1137
|
+
};
|
|
1138
|
+
private get getNumberIndexTypeWorker();
|
|
1139
|
+
get getApparentType(): {
|
|
1140
|
+
(): Type;
|
|
1141
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1142
|
+
};
|
|
1143
|
+
get getReducedType(): {
|
|
1144
|
+
(): Type;
|
|
1145
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1146
|
+
};
|
|
1147
|
+
get getIndexInfos(): {
|
|
1148
|
+
(): readonly IndexInfo[];
|
|
1149
|
+
gen(): Generator<ProtocolRequest, readonly IndexInfo[], ProtocolResponse["result"]>;
|
|
1150
|
+
};
|
|
1151
|
+
get getAliasSymbol(): {
|
|
1152
|
+
(): Symbol | undefined;
|
|
1153
|
+
gen(): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
1154
|
+
};
|
|
1155
|
+
get getTarget(): {
|
|
1156
|
+
(): Type;
|
|
1157
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1158
|
+
};
|
|
1159
|
+
get getFreshType(): {
|
|
1160
|
+
(): FreshableType | undefined;
|
|
1161
|
+
gen(): Generator<ProtocolRequest, FreshableType | undefined, ProtocolResponse["result"]>;
|
|
1162
|
+
};
|
|
1163
|
+
get getRegularType(): {
|
|
1164
|
+
(): FreshableType | undefined;
|
|
1165
|
+
gen(): Generator<ProtocolRequest, FreshableType | undefined, ProtocolResponse["result"]>;
|
|
1166
|
+
};
|
|
1167
|
+
get getTypes(): {
|
|
1168
|
+
(): readonly Type[] | undefined;
|
|
1169
|
+
gen(): Generator<ProtocolRequest, readonly Type[] | undefined, ProtocolResponse["result"]>;
|
|
1170
|
+
};
|
|
1171
|
+
get getTypeParameters(): {
|
|
1172
|
+
(): readonly TypeParameter[];
|
|
1173
|
+
gen(): Generator<ProtocolRequest, readonly TypeParameter[], ProtocolResponse["result"]>;
|
|
1174
|
+
};
|
|
1175
|
+
get getOuterTypeParameters(): {
|
|
1176
|
+
(): readonly TypeParameter[];
|
|
1177
|
+
gen(): Generator<ProtocolRequest, readonly TypeParameter[], ProtocolResponse["result"]>;
|
|
1178
|
+
};
|
|
1179
|
+
get getLocalTypeParameters(): {
|
|
1180
|
+
(): readonly TypeParameter[];
|
|
1181
|
+
gen(): Generator<ProtocolRequest, readonly TypeParameter[], ProtocolResponse["result"]>;
|
|
1182
|
+
};
|
|
1183
|
+
get getAliasTypeArguments(): {
|
|
1184
|
+
(): readonly Type[];
|
|
1185
|
+
gen(): Generator<ProtocolRequest, readonly Type[], ProtocolResponse["result"]>;
|
|
1186
|
+
};
|
|
1187
|
+
get getObjectType(): {
|
|
1188
|
+
(): Type;
|
|
1189
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1190
|
+
};
|
|
1191
|
+
get getIndexType(): {
|
|
1192
|
+
(): Type;
|
|
1193
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1194
|
+
};
|
|
1195
|
+
get getCheckType(): {
|
|
1196
|
+
(): Type;
|
|
1197
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1198
|
+
};
|
|
1199
|
+
get getExtendsType(): {
|
|
1200
|
+
(): Type;
|
|
1201
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1202
|
+
};
|
|
1203
|
+
get getBaseType(): {
|
|
1204
|
+
(): Type;
|
|
1205
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1206
|
+
};
|
|
1207
|
+
get getConstraint(): {
|
|
1208
|
+
(): Type | undefined;
|
|
1209
|
+
gen(): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
1210
|
+
};
|
|
1211
|
+
get getDefault(): {
|
|
1212
|
+
(): Type | undefined;
|
|
1213
|
+
gen(): Generator<ProtocolRequest, Type | undefined, ProtocolResponse["result"]>;
|
|
1214
|
+
};
|
|
1215
|
+
get getTrueType(): {
|
|
1216
|
+
(): Type;
|
|
1217
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1218
|
+
};
|
|
1219
|
+
get getFalseType(): {
|
|
1220
|
+
(): Type;
|
|
1221
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1222
|
+
};
|
|
668
1223
|
/**
|
|
669
1224
|
* Get the base types of this type. Returns `undefined` for any type that is
|
|
670
1225
|
* not a class or interface.
|
|
671
1226
|
*/
|
|
672
|
-
getBaseTypes():
|
|
1227
|
+
get getBaseTypes(): {
|
|
1228
|
+
(): readonly Type[] | undefined;
|
|
1229
|
+
gen(): Generator<ProtocolRequest, readonly Type[] | undefined, ProtocolResponse["result"]>;
|
|
1230
|
+
};
|
|
673
1231
|
isClassOrInterface(): this is InterfaceType;
|
|
674
1232
|
isUnionType(): this is UnionType;
|
|
675
1233
|
isIntersectionType(): this is IntersectionType;
|
|
@@ -728,12 +1286,30 @@ export declare class Signature {
|
|
|
728
1286
|
readonly target?: number | undefined;
|
|
729
1287
|
private returnType;
|
|
730
1288
|
constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry);
|
|
731
|
-
getTypeParameters():
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
1289
|
+
get getTypeParameters(): {
|
|
1290
|
+
(): readonly TypeParameter[];
|
|
1291
|
+
gen(): Generator<ProtocolRequest, readonly TypeParameter[], ProtocolResponse["result"]>;
|
|
1292
|
+
};
|
|
1293
|
+
get getParameters(): {
|
|
1294
|
+
(): readonly Symbol[];
|
|
1295
|
+
gen(): Generator<ProtocolRequest, readonly Symbol[], ProtocolResponse["result"]>;
|
|
1296
|
+
};
|
|
1297
|
+
get getThisParameter(): {
|
|
1298
|
+
(): Symbol | undefined;
|
|
1299
|
+
gen(): Generator<ProtocolRequest, Symbol | undefined, ProtocolResponse["result"]>;
|
|
1300
|
+
};
|
|
1301
|
+
get getTarget(): {
|
|
1302
|
+
(): Signature | undefined;
|
|
1303
|
+
gen(): Generator<ProtocolRequest, Signature | undefined, ProtocolResponse["result"]>;
|
|
1304
|
+
};
|
|
1305
|
+
get getReturnType(): {
|
|
1306
|
+
(): Type;
|
|
1307
|
+
gen(): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1308
|
+
};
|
|
1309
|
+
get getTypeParameterAtPosition(): {
|
|
1310
|
+
(pos: number): Type;
|
|
1311
|
+
gen(pos: number): Generator<ProtocolRequest, Type, ProtocolResponse["result"]>;
|
|
1312
|
+
};
|
|
737
1313
|
get hasRestParameter(): boolean;
|
|
738
1314
|
get isConstruct(): boolean;
|
|
739
1315
|
get isAbstract(): boolean;
|