1 | import * as ts from "typescript";
|
2 | import { SyntaxKind, CompilerOptions, EmitHint, ScriptKind, NewLineKind, LanguageVariant, ScriptTarget, TypeFlags, ObjectFlags, SymbolFlags, TypeFormatFlags, DiagnosticCategory, EditorSettings, ModuleResolutionKind } from "typescript";
|
3 | import { CodeBlockWriter } from "./code-block-writer";
|
4 |
|
5 | export declare class Directory {
|
6 | private __context;
|
7 | private _path;
|
8 | private _pathParts;
|
9 | private constructor();
|
10 | /**
|
11 | * Checks if this directory is an ancestor of the provided directory.
|
12 | * @param possibleDescendant - Directory or source file that's a possible descendant.
|
13 | */
|
14 | isAncestorOf(possibleDescendant: Directory | SourceFile): boolean;
|
15 | /**
|
16 | * Checks if this directory is a descendant of the provided directory.
|
17 | * @param possibleAncestor - Directory or source file that's a possible ancestor.
|
18 | */
|
19 | isDescendantOf(possibleAncestor: Directory): boolean;
|
20 | /**
|
21 | * Gets the path to the directory.
|
22 | */
|
23 | getPath(): string;
|
24 | /**
|
25 | * Gets the directory path's base name.
|
26 | */
|
27 | getBaseName(): string;
|
28 | /**
|
29 | * Gets the parent directory or throws if it doesn't exist or was never added to the project.
|
30 | */
|
31 | getParentOrThrow(): Directory;
|
32 | /**
|
33 | * Gets the parent directory if it exists and was added to the project.
|
34 | */
|
35 | getParent(): Directory | undefined;
|
36 | /**
|
37 | * Gets a child directory with the specified path or throws if not found.
|
38 | * @param path - Relative path from this directory or absolute path.
|
39 | */
|
40 | getDirectoryOrThrow(path: string): Directory;
|
41 | /**
|
42 | * Gets a child directory by the specified condition or throws if not found.
|
43 | * @param condition - Condition to check the directory with.
|
44 | */
|
45 | getDirectoryOrThrow(condition: (directory: Directory) => boolean): Directory;
|
46 | /**
|
47 | * Gets a directory with the specified path or undefined if not found.
|
48 | * @param path - Relative path from this directory or absolute path.
|
49 | */
|
50 | getDirectory(path: string): Directory | undefined;
|
51 | /**
|
52 | * Gets a child directory by the specified condition or undefined if not found.
|
53 | * @param condition - Condition to check the directory with.
|
54 | */
|
55 | getDirectory(condition: (directory: Directory) => boolean): Directory | undefined;
|
56 | /**
|
57 | * Gets a child source file with the specified path or throws if not found.
|
58 | * @param path - Relative or absolute path to the file.
|
59 | */
|
60 | getSourceFileOrThrow(path: string): SourceFile;
|
61 | /**
|
62 | * Gets a child source file by the specified condition or throws if not found.
|
63 | * @param condition - Condition to check the source file with.
|
64 | */
|
65 | getSourceFileOrThrow(condition: (sourceFile: SourceFile) => boolean): SourceFile;
|
66 | /**
|
67 | * Gets a child source file with the specified path or undefined if not found.
|
68 | * @param path - Relative or absolute path to the file.
|
69 | */
|
70 | getSourceFile(path: string): SourceFile | undefined;
|
71 | /**
|
72 | * Gets a child source file by the specified condition or undefined if not found.
|
73 | * @param condition - Condition to check the source file with.
|
74 | */
|
75 | getSourceFile(condition: (sourceFile: SourceFile) => boolean): SourceFile | undefined;
|
76 | /**
|
77 | * Gets the child directories.
|
78 | */
|
79 | getDirectories(): Directory[];
|
80 | /**
|
81 | * Gets the source files within this directory.
|
82 | */
|
83 | getSourceFiles(): SourceFile[];
|
84 | /**
|
85 | * Gets the source files in the current directory and all the descendant directories.
|
86 | */
|
87 | getDescendantSourceFiles(): SourceFile[];
|
88 | /**
|
89 | * Gets the descendant directories.
|
90 | */
|
91 | getDescendantDirectories(): Directory[];
|
92 | /**
|
93 | * Add source files based on file globs.
|
94 | * @param fileGlobs - File glob or globs to add files based on.
|
95 | * @returns The matched source files.
|
96 | */
|
97 | addExistingSourceFiles(fileGlobs: string | ReadonlyArray<string>): SourceFile[];
|
98 | /**
|
99 | * Adds an existing directory from the relative path or directory name, or returns undefined if it doesn't exist.
|
100 | *
|
101 | * Will return the directory if it was already added.
|
102 | * @param dirPath - Directory name or path to the directory that should be added.
|
103 | * @param options - Options.
|
104 | */
|
105 | addExistingDirectoryIfExists(dirPath: string, options?: DirectoryAddOptions): Directory | undefined;
|
106 | /**
|
107 | * Adds an existing directory from the relative path or directory name, or throws if it doesn't exist.
|
108 | *
|
109 | * Will return the directory if it was already added.
|
110 | * @param dirPath - Directory name or path to the directory that should be added.
|
111 | * @throws DirectoryNotFoundError if the directory does not exist.
|
112 | */
|
113 | addExistingDirectory(dirPath: string, options?: DirectoryAddOptions): Directory;
|
114 | /**
|
115 | * Creates a directory if it doesn't exist.
|
116 | * @param dirPath - Relative or absolute path to the directory that should be created.
|
117 | */
|
118 | createDirectory(dirPath: string): Directory;
|
119 | /**
|
120 | * Creates a source file, relative to this directory.
|
121 | *
|
122 | * Note: The file will not be created and saved to the file system until .save() is called on the source file.
|
123 | * @param relativeFilePath - Relative file path of the source file to create.
|
124 | * @param sourceFileText - Text, structure, or writer function to create the source file text with.
|
125 | * @param options - Options.
|
126 | * @throws - InvalidOperationError if a source file already exists at the provided file name.
|
127 | */
|
128 | createSourceFile(relativeFilePath: string, sourceFileText?: string | SourceFileStructure | WriterFunction, options?: SourceFileCreateOptions): SourceFile;
|
129 | /**
|
130 | * Adds an existing source file, relative to this directory, or returns undefined.
|
131 | *
|
132 | * Will return the source file if it was already added.
|
133 | * @param relativeFilePath - Relative file path to add.
|
134 | */
|
135 | addExistingSourceFileIfExists(relativeFilePath: string): SourceFile | undefined;
|
136 | /**
|
137 | * Adds an existing source file, relative to this directory, or throws if it doesn't exist.
|
138 | *
|
139 | * Will return the source file if it was already added.
|
140 | * @param relativeFilePath - Relative file path to add.
|
141 | * @throws FileNotFoundError when the file doesn't exist.
|
142 | */
|
143 | addExistingSourceFile(relativeFilePath: string): SourceFile;
|
144 | /**
|
145 | * Emits the files in the directory.
|
146 | * @param options - Options for emitting.
|
147 | */
|
148 | emit(options?: {
|
149 | emitOnlyDtsFiles?: boolean;
|
150 | outDir?: string;
|
151 | declarationDir?: string;
|
152 | }): Promise<DirectoryEmitResult>;
|
153 | /**
|
154 | * Emits the files in the directory synchronously.
|
155 | *
|
156 | * Remarks: This might be very slow compared to the asynchronous version if there are a lot of files.
|
157 | * @param options - Options for emitting.
|
158 | */
|
159 | emitSync(options?: {
|
160 | emitOnlyDtsFiles?: boolean;
|
161 | outDir?: string;
|
162 | declarationDir?: string;
|
163 | }): DirectoryEmitResult;
|
164 | private _emitInternal;
|
165 | /**
|
166 | * Copies the directory to a subdirectory of the specified directory.
|
167 | * @param dirPathOrDirectory Directory path or directory object to copy the directory to.
|
168 | * @param options Options for copying.
|
169 | * @returns The new copied directory.
|
170 | */
|
171 | copyToDirectory(dirPathOrDirectory: string | Directory, options?: DirectoryCopyOptions): Directory;
|
172 | /**
|
173 | * Copies the directory to a new directory.
|
174 | * @param relativeOrAbsolutePath - The relative or absolute path to the new directory.
|
175 | * @param options - Options.
|
176 | * @returns The directory the copy was made to.
|
177 | */
|
178 | copy(relativeOrAbsolutePath: string, options?: DirectoryCopyOptions): Directory;
|
179 | /**
|
180 | * Immediately copies the directory to the specified path asynchronously.
|
181 | * @param relativeOrAbsolutePath - Directory path as an absolute or relative path.
|
182 | * @param options - Options for moving the directory.
|
183 | * @remarks If includeTrackedFiles is true, then it will execute the pending operations in the current directory.
|
184 | */
|
185 | copyImmediately(relativeOrAbsolutePath: string, options?: DirectoryCopyOptions): Promise<Directory>;
|
186 | /**
|
187 | * Immediately copies the directory to the specified path synchronously.
|
188 | * @param relativeOrAbsolutePath - Directory path as an absolute or relative path.
|
189 | * @param options - Options for moving the directory.
|
190 | * @remarks If includeTrackedFiles is true, then it will execute the pending operations in the current directory.
|
191 | */
|
192 | copyImmediatelySync(relativeOrAbsolutePath: string, options?: DirectoryCopyOptions): Directory;
|
193 | /**
|
194 | * Moves the directory to a subdirectory of the specified directory.
|
195 | * @param dirPathOrDirectory Directory path or directory object to move the directory to.
|
196 | * @param options Options for moving.
|
197 | */
|
198 | moveToDirectory(dirPathOrDirectory: string | Directory, options?: DirectoryMoveOptions): this;
|
199 | /**
|
200 | * Moves the directory to a new path.
|
201 | * @param relativeOrAbsolutePath - Directory path as an absolute or relative path.
|
202 | * @param options - Options for moving the directory.
|
203 | */
|
204 | move(relativeOrAbsolutePath: string, options?: DirectoryMoveOptions): this;
|
205 | /**
|
206 | * Immediately moves the directory to a new path asynchronously.
|
207 | * @param relativeOrAbsolutePath - Directory path as an absolute or relative path.
|
208 | * @param options - Options for moving the directory.
|
209 | */
|
210 | moveImmediately(relativeOrAbsolutePath: string, options?: DirectoryMoveOptions): Promise<this>;
|
211 | /**
|
212 | * Immediately moves the directory to a new path synchronously.
|
213 | * @param relativeOrAbsolutePath - Directory path as an absolute or relative path.
|
214 | * @param options - Options for moving the directory.
|
215 | */
|
216 | moveImmediatelySync(relativeOrAbsolutePath: string, options?: DirectoryMoveOptions): this;
|
217 | /**
|
218 | * Queues a deletion of the directory to the file system.
|
219 | *
|
220 | * The directory will be deleted when calling ast.save(). If you wish to delete the file immediately, then use deleteImmediately().
|
221 | */
|
222 | delete(): void;
|
223 | /**
|
224 | * Asyncronously deletes the directory and all its descendants from the file system.
|
225 | */
|
226 | deleteImmediately(): Promise<void>;
|
227 | /**
|
228 | * Synchronously deletes the directory and all its descendants from the file system.
|
229 | */
|
230 | deleteImmediatelySync(): void;
|
231 | /**
|
232 | * Forgets the directory and all its descendants from the Project.
|
233 | *
|
234 | * Note: Does not delete the directory from the file system.
|
235 | */
|
236 | forget(): void;
|
237 | /**
|
238 | * Asynchronously saves the directory and all the unsaved source files to the disk.
|
239 | */
|
240 | save(): Promise<void>;
|
241 | /**
|
242 | * Synchronously saves the directory and all the unsaved source files to the disk.
|
243 | */
|
244 | saveSync(): void;
|
245 | /**
|
246 | * Gets the relative path to another source file.
|
247 | * @param sourceFile - Source file.
|
248 | */
|
249 | getRelativePathTo(sourceFile: SourceFile): string;
|
250 | /**
|
251 | * Gets the relative path to another directory.
|
252 | * @param directory - Directory.
|
253 | */
|
254 | getRelativePathTo(directory: Directory): string;
|
255 | /**
|
256 | * Gets the relative path to the specified source file as a module specifier.
|
257 | * @param sourceFile - Source file.
|
258 | */
|
259 | getRelativePathAsModuleSpecifierTo(sourceFile: SourceFile): string;
|
260 | /**
|
261 | * Gets the relative path to the specified directory as a module specifier.
|
262 | * @param directory - Directory.
|
263 | */
|
264 | getRelativePathAsModuleSpecifierTo(directory: Directory): string;
|
265 | /**
|
266 | * Gets if the directory was forgotten.
|
267 | */
|
268 | wasForgotten(): boolean;
|
269 | }
|
270 |
|
271 | export interface DirectoryAddOptions {
|
272 | |
273 |
|
274 |
|
275 |
|
276 | recursive?: boolean;
|
277 | }
|
278 |
|
279 | export interface DirectoryCopyOptions extends SourceFileCopyOptions {
|
280 | |
281 |
|
282 |
|
283 |
|
284 | includeUntrackedFiles?: boolean;
|
285 | }
|
286 | export declare class DirectoryEmitResult {
|
287 | private readonly _emitSkipped;
|
288 | private readonly _outputFilePaths;
|
289 | private constructor();
|
290 | /**
|
291 | * Gets if the emit was skipped.
|
292 | */
|
293 | getEmitSkipped(): boolean;
|
294 | /**
|
295 | * Gets the output file paths.
|
296 | */
|
297 | getOutputFilePaths(): string[];
|
298 | }
|
299 |
|
300 | export interface DirectoryMoveOptions extends SourceFileMoveOptions {
|
301 | }
|
302 | export interface FileSystemHost {
|
303 | delete(path: string): Promise<void>;
|
304 | deleteSync(path: string): void;
|
305 | readDirSync(dirPath: string): string[];
|
306 | readFile(filePath: string, encoding?: string): Promise<string>;
|
307 | readFileSync(filePath: string, encoding?: string): string;
|
308 | writeFile(filePath: string, fileText: string): Promise<void>;
|
309 | writeFileSync(filePath: string, fileText: string): void;
|
310 | mkdir(dirPath: string): Promise<void>;
|
311 | mkdirSync(dirPath: string): void;
|
312 | move(srcPath: string, destPath: string): Promise<void>;
|
313 | moveSync(srcPath: string, destPath: string): void;
|
314 | copy(srcPath: string, destPath: string): Promise<void>;
|
315 | copySync(srcPath: string, destPath: string): void;
|
316 | fileExists(filePath: string): Promise<boolean>;
|
317 | fileExistsSync(filePath: string): boolean;
|
318 | directoryExists(dirPath: string): Promise<boolean>;
|
319 | directoryExistsSync(dirPath: string): boolean;
|
320 | getCurrentDirectory(): string;
|
321 | glob(patterns: ReadonlyArray<string>): string[];
|
322 | }
|
323 |
|
324 | export interface ProjectOptions {
|
325 |
|
326 | compilerOptions?: CompilerOptions;
|
327 |
|
328 | tsConfigFilePath?: string;
|
329 |
|
330 | addFilesFromTsConfig?: boolean;
|
331 |
|
332 | manipulationSettings?: Partial<ManipulationSettings>;
|
333 |
|
334 | skipFileDependencyResolution?: boolean;
|
335 |
|
336 | useVirtualFileSystem?: boolean;
|
337 | |
338 |
|
339 |
|
340 |
|
341 | fileSystem?: FileSystemHost;
|
342 | }
|
343 |
|
344 |
|
345 |
|
346 |
|
347 | export declare class Project {
|
348 | |
349 |
|
350 |
|
351 |
|
352 | constructor(options?: ProjectOptions);
|
353 | /** Gets the manipulation settings. */
|
354 | readonly manipulationSettings: ManipulationSettingsContainer;
|
355 | /** Gets the compiler options for modification. */
|
356 | readonly compilerOptions: CompilerOptionsContainer;
|
357 | /**
|
358 | * Adds the source files the project's source files depend on to the project.
|
359 | * @returns The added source files.
|
360 | * @remarks
|
361 | * * This should be done after source files are added to the project, preferably once to
|
362 | * avoid doing more work than necessary.
|
363 | * * This is done by default when creating a Project and providing a tsconfig.json and
|
364 | * not specifying to not add the source files.
|
365 | */
|
366 | resolveSourceFileDependencies(): SourceFile[];
|
367 | /**
|
368 | * Adds an existing directory from the path or returns undefined if it doesn't exist.
|
369 | *
|
370 | * Will return the directory if it was already added.
|
371 | * @param dirPath - Path to add the directory at.
|
372 | * @param options - Options.
|
373 | */
|
374 | addExistingDirectoryIfExists(dirPath: string, options?: DirectoryAddOptions): Directory | undefined;
|
375 | /**
|
376 | * Adds an existing directory from the path or throws if it doesn't exist.
|
377 | *
|
378 | * Will return the directory if it was already added.
|
379 | * @param dirPath - Path to add the directory at.
|
380 | * @param options - Options.
|
381 | * @throws DirectoryNotFoundError when the directory does not exist.
|
382 | */
|
383 | addExistingDirectory(dirPath: string, options?: DirectoryAddOptions): Directory;
|
384 | /**
|
385 | * Creates a directory at the specified path.
|
386 | * @param dirPath - Path to create the directory at.
|
387 | */
|
388 | createDirectory(dirPath: string): Directory;
|
389 | /**
|
390 | * Gets a directory by the specified path or throws if it doesn't exist.
|
391 | * @param dirPath - Path to create the directory at.
|
392 | */
|
393 | getDirectoryOrThrow(dirPath: string): Directory;
|
394 | /**
|
395 | * Gets a directory by the specified path or returns undefined if it doesn't exist.
|
396 | * @param dirPath - Directory path.
|
397 | */
|
398 | getDirectory(dirPath: string): Directory | undefined;
|
399 | /**
|
400 | * Gets all the directories.
|
401 | */
|
402 | getDirectories(): Directory[];
|
403 | /**
|
404 | * Gets the directories without a parent.
|
405 | */
|
406 | getRootDirectories(): Directory[];
|
407 | /**
|
408 | * Adds source files based on file globs.
|
409 | * @param fileGlobs - File glob or globs to add files based on.
|
410 | * @returns The matched source files.
|
411 | */
|
412 | addExistingSourceFiles(fileGlobs: string | ReadonlyArray<string>): SourceFile[];
|
413 | /**
|
414 | * Adds a source file from a file path if it exists or returns undefined.
|
415 | *
|
416 | * Will return the source file if it was already added.
|
417 | * @param filePath - File path to get the file from.
|
418 | */
|
419 | addExistingSourceFileIfExists(filePath: string): SourceFile | undefined;
|
420 | /**
|
421 | * Adds an existing source file from a file path or throws if it doesn't exist.
|
422 | *
|
423 | * Will return the source file if it was already added.
|
424 | * @param filePath - File path to get the file from.
|
425 | * @throws FileNotFoundError when the file is not found.
|
426 | */
|
427 | addExistingSourceFile(filePath: string): SourceFile;
|
428 | /**
|
429 | * Adds all the source files from the specified tsconfig.json.
|
430 | *
|
431 | * Note that this is done by default when specifying a tsconfig file in the constructor and not explicitly setting the
|
432 | * addFilesFromTsConfig option to false.
|
433 | * @param tsConfigFilePath - File path to the tsconfig.json file.
|
434 | */
|
435 | addSourceFilesFromTsConfig(tsConfigFilePath: string): SourceFile[];
|
436 | /**
|
437 | * Creates a source file at the specified file path with the specified text.
|
438 | *
|
439 | * Note: The file will not be created and saved to the file system until .save() is called on the source file.
|
440 | * @param filePath - File path of the source file.
|
441 | * @param sourceFileText - Text, structure, or writer function for the source file text.
|
442 | * @param options - Options.
|
443 | * @throws - InvalidOperationError if a source file already exists at the provided file path.
|
444 | */
|
445 | createSourceFile(filePath: string, sourceFileText?: string | SourceFileStructure | WriterFunction, options?: SourceFileCreateOptions): SourceFile;
|
446 | /**
|
447 | * Removes a source file from the AST.
|
448 | * @param sourceFile - Source file to remove.
|
449 | * @returns True if removed.
|
450 | */
|
451 | removeSourceFile(sourceFile: SourceFile): boolean;
|
452 | /**
|
453 | * Gets a source file by a file name or file path. Throws an error if it doesn't exist.
|
454 | * @param fileNameOrPath - File name or path that the path could end with or equal.
|
455 | */
|
456 | getSourceFileOrThrow(fileNameOrPath: string): SourceFile;
|
457 | /**
|
458 | * Gets a source file by a search function. Throws an erorr if it doesn't exist.
|
459 | * @param searchFunction - Search function.
|
460 | */
|
461 | getSourceFileOrThrow(searchFunction: (file: SourceFile) => boolean): SourceFile;
|
462 | /**
|
463 | * Gets a source file by a file name or file path. Returns undefined if none exists.
|
464 | * @param fileNameOrPath - File name or path that the path could end with or equal.
|
465 | */
|
466 | getSourceFile(fileNameOrPath: string): SourceFile | undefined;
|
467 | /**
|
468 | * Gets a source file by a search function. Returns undefined if none exists.
|
469 | * @param searchFunction - Search function.
|
470 | */
|
471 | getSourceFile(searchFunction: (file: SourceFile) => boolean): SourceFile | undefined;
|
472 | /**
|
473 | * Gets all the source files added to the project.
|
474 | * @param globPattern - Glob pattern for filtering out the source files.
|
475 | */
|
476 | getSourceFiles(): SourceFile[];
|
477 | /**
|
478 | * Gets all the source files added to the project that match a pattern.
|
479 | * @param globPattern - Glob pattern for filtering out the source files.
|
480 | */
|
481 | getSourceFiles(globPattern: string): SourceFile[];
|
482 | /**
|
483 | * Gets all the source files added to the project that match the passed in patterns.
|
484 | * @param globPatterns - Glob patterns for filtering out the source files.
|
485 | */
|
486 | getSourceFiles(globPatterns: ReadonlyArray<string>): SourceFile[];
|
487 | /**
|
488 | * Gets the specified ambient module symbol or returns undefined if not found.
|
489 | * @param moduleName - The ambient module name with or without quotes.
|
490 | */
|
491 | getAmbientModule(moduleName: string): Symbol | undefined;
|
492 | /**
|
493 | * Gets the specified ambient module symbol or throws if not found.
|
494 | * @param moduleName - The ambient module name with or without quotes.
|
495 | */
|
496 | getAmbientModuleOrThrow(moduleName: string): Symbol;
|
497 | /**
|
498 | * Gets the ambient module symbols (ex. modules in the @types folder or node_modules).
|
499 | */
|
500 | getAmbientModules(): Symbol[];
|
501 | /**
|
502 | * Saves all the unsaved source files to the file system and deletes all deleted files.
|
503 | */
|
504 | save(): Promise<void>;
|
505 | /**
|
506 | * Synchronously saves all the unsaved source files to the file system and deletes all deleted files.
|
507 | *
|
508 | * Remarks: This might be very slow compared to the asynchronous version if there are a lot of files.
|
509 | */
|
510 | saveSync(): void;
|
511 | /**
|
512 | * Enables logging to the console.
|
513 | * @param enabled - Enabled.
|
514 | */
|
515 | enableLogging(enabled?: boolean): void;
|
516 | private _getUnsavedSourceFiles;
|
517 | /**
|
518 | * Gets the pre-emit diagnostics.
|
519 | */
|
520 | getPreEmitDiagnostics(): Diagnostic[];
|
521 | /**
|
522 | * Gets the language service.
|
523 | */
|
524 | getLanguageService(): LanguageService;
|
525 | /**
|
526 | * Gets the program.
|
527 | */
|
528 | getProgram(): Program;
|
529 | /**
|
530 | * Gets the type checker.
|
531 | */
|
532 | getTypeChecker(): TypeChecker;
|
533 | /**
|
534 | * Gets the file system.
|
535 | */
|
536 | getFileSystem(): FileSystemHost;
|
537 | /**
|
538 | * Emits all the source files.
|
539 | * @param emitOptions - Optional emit options.
|
540 | */
|
541 | emit(emitOptions?: EmitOptions): EmitResult;
|
542 | /**
|
543 | * Emits all the source files to memory.
|
544 | * @param emitOptions - Optional emit options.
|
545 | */
|
546 | emitToMemory(emitOptions?: EmitOptions): MemoryEmitResult;
|
547 | /**
|
548 | * Gets the compiler options.
|
549 | */
|
550 | getCompilerOptions(): CompilerOptions;
|
551 | /**
|
552 | * Creates a writer with the current manipulation settings.
|
553 | * @remarks Generally it's best to use a provided writer, but this may be useful in some scenarios.
|
554 | */
|
555 | createWriter(): CodeBlockWriter;
|
556 | /**
|
557 | * Forgets the nodes created in the scope of the passed in block.
|
558 | *
|
559 | * This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
|
560 | * @param block - Block of code to run.
|
561 | */
|
562 | forgetNodesCreatedInBlock(block: (remember: (...node: Node[]) => void) => void): void;
|
563 | /**
|
564 | * Forgets the nodes created in the scope of the passed in block asynchronously.
|
565 | *
|
566 | * This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
|
567 | * @param block - Block of code to run.
|
568 | */
|
569 | forgetNodesCreatedInBlock(block: (remember: (...node: Node[]) => void) => Promise<void>): void;
|
570 | /**
|
571 | * Formats an array of diagnostics with their color and context into a string.
|
572 | * @param diagnostics - Diagnostics to get a string of.
|
573 | * @param options - Collection of options. For exmaple, the new line character to use (defaults to the OS' new line character).
|
574 | */
|
575 | formatDiagnosticsWithColorAndContext(diagnostics: ReadonlyArray<Diagnostic>, opts?: {
|
576 | newLineChar?: "\n" | "\r\n";
|
577 | }): string;
|
578 | /**
|
579 | * Applies the given file text changes to this project. This modifies and possibly creates new SourceFiles.
|
580 | *
|
581 | * WARNING: This will forget any previously navigated descendant nodes of changed files. It's best to do
|
582 | * this when you're all done.
|
583 | * @param fileTextChanges - Collections of file changes to apply to this project.
|
584 | * @param options - Options for applying the text changes.
|
585 | */
|
586 | applyFileTextChanges(fileTextChanges: ReadonlyArray<FileTextChanges>, options?: {
|
587 | overwrite?: boolean;
|
588 | }): void;
|
589 | }
|
590 |
|
591 | export interface SourceFileCreateOptions {
|
592 | overwrite?: boolean;
|
593 | }
|
594 |
|
595 | export declare type Constructor<T> = new (...args: any[]) => T;
|
596 |
|
597 | export declare type WriterFunction = (writer: CodeBlockWriter) => void;
|
598 |
|
599 | /**
|
600 | * Creates a wrapped node from a compiler node.
|
601 | * @param node - Node to create a wrapped node from.
|
602 | * @param info - Info for creating the wrapped node.
|
603 | */
|
604 | export declare function createWrappedNode<T extends ts.Node = ts.Node>(node: T, opts?: CreateWrappedNodeOptions): CompilerNodeToWrappedType<T>;
|
605 |
|
606 | export interface CreateWrappedNodeOptions {
|
607 | |
608 |
|
609 |
|
610 | compilerOptions?: CompilerOptions;
|
611 | |
612 |
|
613 |
|
614 | sourceFile?: ts.SourceFile;
|
615 | |
616 |
|
617 |
|
618 | typeChecker?: ts.TypeChecker;
|
619 | }
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 | export declare function printNode(node: ts.Node, options?: PrintNodeOptions): string;
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 | export declare function printNode(node: ts.Node, sourceFile: ts.SourceFile, options?: PrintNodeOptions): string;
|
637 |
|
638 |
|
639 |
|
640 |
|
641 | export interface PrintNodeOptions {
|
642 | |
643 |
|
644 |
|
645 | removeComments?: boolean;
|
646 | |
647 |
|
648 |
|
649 |
|
650 |
|
651 | newLineKind?: NewLineKind;
|
652 | |
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 | emitHint?: EmitHint;
|
661 | |
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 |
|
668 |
|
669 | scriptKind?: ScriptKind;
|
670 | }
|
671 |
|
672 | export declare type SourceFileReferencingNodes = ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration | CallExpression;
|
673 |
|
674 | export interface CompilerOptionsFromTsConfigOptions {
|
675 | encoding?: string;
|
676 | fileSystem?: FileSystemHost;
|
677 | }
|
678 |
|
679 | export interface CompilerOptionsFromTsConfigResult {
|
680 | options: CompilerOptions;
|
681 | errors: Diagnostic[];
|
682 | }
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 | export declare function getCompilerOptionsFromTsConfig(filePath: string, options?: CompilerOptionsFromTsConfigOptions): CompilerOptionsFromTsConfigResult;
|
690 |
|
691 |
|
692 |
|
693 |
|
694 | export declare class TypeGuards {
|
695 | private constructor();
|
696 | /**
|
697 | * Gets if the node has an expression.
|
698 | * @param node - Node to check.
|
699 | */
|
700 | static hasExpression(node: Node): node is Node & {
|
701 | getExpression(): Expression;
|
702 | };
|
703 | |
704 |
|
705 |
|
706 |
|
707 | static hasName(node: Node): node is Node & {
|
708 | getName(): string;
|
709 | getNameNode(): Node;
|
710 | };
|
711 | |
712 |
|
713 |
|
714 |
|
715 | static hasBody(node: Node): node is Node & {
|
716 | getBody(): Node;
|
717 | };
|
718 | |
719 |
|
720 |
|
721 |
|
722 | static isAbstractableNode(node: Node): node is AbstractableNode & AbstractableNodeExtensionType;
|
723 | |
724 |
|
725 |
|
726 |
|
727 | static isAmbientableNode(node: Node): node is AmbientableNode & AmbientableNodeExtensionType;
|
728 | |
729 |
|
730 |
|
731 |
|
732 | static isAnyKeyword(node: Node): node is Expression;
|
733 | |
734 |
|
735 |
|
736 |
|
737 | static isArgumentedNode(node: Node): node is ArgumentedNode & ArgumentedNodeExtensionType;
|
738 | |
739 |
|
740 |
|
741 |
|
742 | static isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
|
743 | |
744 |
|
745 |
|
746 |
|
747 | static isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
|
748 | |
749 |
|
750 |
|
751 |
|
752 | static isArrayTypeNode(node: Node): node is ArrayTypeNode;
|
753 | |
754 |
|
755 |
|
756 |
|
757 | static isArrowFunction(node: Node): node is ArrowFunction;
|
758 | |
759 |
|
760 |
|
761 |
|
762 | static isAsExpression(node: Node): node is AsExpression;
|
763 | |
764 |
|
765 |
|
766 |
|
767 | static isAsyncableNode(node: Node): node is AsyncableNode & AsyncableNodeExtensionType;
|
768 | |
769 |
|
770 |
|
771 |
|
772 | static isAwaitExpression(node: Node): node is AwaitExpression;
|
773 | |
774 |
|
775 |
|
776 |
|
777 | static isAwaitableNode(node: Node): node is AwaitableNode & AwaitableNodeExtensionType;
|
778 | |
779 |
|
780 |
|
781 |
|
782 | static isBinaryExpression(node: Node): node is BinaryExpression;
|
783 | |
784 |
|
785 |
|
786 |
|
787 | static isBindingElement(node: Node): node is BindingElement;
|
788 | |
789 |
|
790 |
|
791 |
|
792 | static isBindingNamedNode(node: Node): node is BindingNamedNode & BindingNamedNodeExtensionType;
|
793 | |
794 |
|
795 |
|
796 |
|
797 | static isBlock(node: Node): node is Block;
|
798 | |
799 |
|
800 |
|
801 |
|
802 | static isBodiedNode(node: Node): node is BodiedNode & BodiedNodeExtensionType;
|
803 | |
804 |
|
805 |
|
806 |
|
807 | static isBodyableNode(node: Node): node is BodyableNode & BodyableNodeExtensionType;
|
808 | |
809 |
|
810 |
|
811 |
|
812 | static isBooleanKeyword(node: Node): node is Expression;
|
813 | |
814 |
|
815 |
|
816 |
|
817 | static isBooleanLiteral(node: Node): node is BooleanLiteral;
|
818 | |
819 |
|
820 |
|
821 |
|
822 | static isBreakStatement(node: Node): node is BreakStatement;
|
823 | |
824 |
|
825 |
|
826 |
|
827 | static isCallExpression(node: Node): node is CallExpression;
|
828 | |
829 |
|
830 |
|
831 |
|
832 | static isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
|
833 | |
834 |
|
835 |
|
836 |
|
837 | static isCaseBlock(node: Node): node is CaseBlock;
|
838 | |
839 |
|
840 |
|
841 |
|
842 | static isCaseClause(node: Node): node is CaseClause;
|
843 | |
844 |
|
845 |
|
846 |
|
847 | static isCatchClause(node: Node): node is CatchClause;
|
848 | |
849 |
|
850 |
|
851 |
|
852 | static isChildOrderableNode(node: Node): node is ChildOrderableNode & ChildOrderableNodeExtensionType;
|
853 | |
854 |
|
855 |
|
856 |
|
857 | static isClassDeclaration(node: Node): node is ClassDeclaration;
|
858 | |
859 |
|
860 |
|
861 |
|
862 | static isClassExpression(node: Node): node is ClassExpression;
|
863 | |
864 |
|
865 |
|
866 |
|
867 | static isClassLikeDeclarationBase(node: Node): node is ClassLikeDeclarationBase & ClassLikeDeclarationBaseExtensionType;
|
868 | |
869 |
|
870 |
|
871 |
|
872 | static isCommaListExpression(node: Node): node is CommaListExpression;
|
873 | |
874 |
|
875 |
|
876 |
|
877 | static isComputedPropertyName(node: Node): node is ComputedPropertyName;
|
878 | |
879 |
|
880 |
|
881 |
|
882 | static isConditionalExpression(node: Node): node is ConditionalExpression;
|
883 | |
884 |
|
885 |
|
886 |
|
887 | static isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
|
888 | |
889 |
|
890 |
|
891 |
|
892 | static isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
|
893 | |
894 |
|
895 |
|
896 |
|
897 | static isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
|
898 | |
899 |
|
900 |
|
901 |
|
902 | static isContinueStatement(node: Node): node is ContinueStatement;
|
903 | |
904 |
|
905 |
|
906 |
|
907 | static isDebuggerStatement(node: Node): node is DebuggerStatement;
|
908 | |
909 |
|
910 |
|
911 |
|
912 | static isDeclarationNamedNode(node: Node): node is DeclarationNamedNode & DeclarationNamedNodeExtensionType;
|
913 | |
914 |
|
915 |
|
916 |
|
917 | static isDecoratableNode(node: Node): node is DecoratableNode & DecoratableNodeExtensionType;
|
918 | |
919 |
|
920 |
|
921 |
|
922 | static isDecorator(node: Node): node is Decorator;
|
923 | |
924 |
|
925 |
|
926 |
|
927 | static isDefaultClause(node: Node): node is DefaultClause;
|
928 | |
929 |
|
930 |
|
931 |
|
932 | static isDeleteExpression(node: Node): node is DeleteExpression;
|
933 | |
934 |
|
935 |
|
936 |
|
937 | static isDoStatement(node: Node): node is DoStatement;
|
938 | |
939 |
|
940 |
|
941 |
|
942 | static isElementAccessExpression(node: Node): node is ElementAccessExpression;
|
943 | |
944 |
|
945 |
|
946 |
|
947 | static isEmptyStatement(node: Node): node is EmptyStatement;
|
948 | |
949 |
|
950 |
|
951 |
|
952 | static isEnumDeclaration(node: Node): node is EnumDeclaration;
|
953 | |
954 |
|
955 |
|
956 |
|
957 | static isEnumMember(node: Node): node is EnumMember;
|
958 | |
959 |
|
960 |
|
961 |
|
962 | static isExclamationTokenableNode(node: Node): node is ExclamationTokenableNode & ExclamationTokenableNodeExtensionType;
|
963 | |
964 |
|
965 |
|
966 |
|
967 | static isExportAssignment(node: Node): node is ExportAssignment;
|
968 | |
969 |
|
970 |
|
971 |
|
972 | static isExportDeclaration(node: Node): node is ExportDeclaration;
|
973 | |
974 |
|
975 |
|
976 |
|
977 | static isExportSpecifier(node: Node): node is ExportSpecifier;
|
978 | |
979 |
|
980 |
|
981 |
|
982 | static isExportableNode(node: Node): node is ExportableNode & ExportableNodeExtensionType;
|
983 | |
984 |
|
985 |
|
986 |
|
987 | static isExpression(node: Node): node is Expression;
|
988 | |
989 |
|
990 |
|
991 |
|
992 | static isExpressionStatement(node: Node): node is ExpressionStatement;
|
993 | |
994 |
|
995 |
|
996 |
|
997 | static isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
|
998 | |
999 |
|
1000 |
|
1001 |
|
1002 | static isExpressionedNode(node: Node): node is ExpressionedNode & ExpressionedNodeExtensionType;
|
1003 | |
1004 |
|
1005 |
|
1006 |
|
1007 | static isExtendsClauseableNode(node: Node): node is ExtendsClauseableNode & ExtendsClauseableNodeExtensionType;
|
1008 | |
1009 |
|
1010 |
|
1011 |
|
1012 | static isExternalModuleReference(node: Node): node is ExternalModuleReference;
|
1013 | |
1014 |
|
1015 |
|
1016 |
|
1017 | static isFalseKeyword(node: Node): node is BooleanLiteral;
|
1018 | |
1019 |
|
1020 |
|
1021 |
|
1022 | static isForInStatement(node: Node): node is ForInStatement;
|
1023 | |
1024 |
|
1025 |
|
1026 |
|
1027 | static isForOfStatement(node: Node): node is ForOfStatement;
|
1028 | |
1029 |
|
1030 |
|
1031 |
|
1032 | static isForStatement(node: Node): node is ForStatement;
|
1033 | |
1034 |
|
1035 |
|
1036 |
|
1037 | static isFunctionDeclaration(node: Node): node is FunctionDeclaration;
|
1038 | |
1039 |
|
1040 |
|
1041 |
|
1042 | static isFunctionExpression(node: Node): node is FunctionExpression;
|
1043 | |
1044 |
|
1045 |
|
1046 |
|
1047 | static isFunctionLikeDeclaration(node: Node): node is FunctionLikeDeclaration & FunctionLikeDeclarationExtensionType;
|
1048 | |
1049 |
|
1050 |
|
1051 |
|
1052 | static isFunctionOrConstructorTypeNodeBase(node: Node): node is FunctionOrConstructorTypeNodeBase;
|
1053 | |
1054 |
|
1055 |
|
1056 |
|
1057 | static isFunctionTypeNode(node: Node): node is FunctionTypeNode;
|
1058 | |
1059 |
|
1060 |
|
1061 |
|
1062 | static isGeneratorableNode(node: Node): node is GeneratorableNode & GeneratorableNodeExtensionType;
|
1063 | |
1064 |
|
1065 |
|
1066 |
|
1067 | static isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
|
1068 | |
1069 |
|
1070 |
|
1071 |
|
1072 | static isHeritageClause(node: Node): node is HeritageClause;
|
1073 | |
1074 |
|
1075 |
|
1076 |
|
1077 | static isHeritageClauseableNode(node: Node): node is HeritageClauseableNode & HeritageClauseableNodeExtensionType;
|
1078 | |
1079 |
|
1080 |
|
1081 |
|
1082 | static isIdentifier(node: Node): node is Identifier;
|
1083 | |
1084 |
|
1085 |
|
1086 |
|
1087 | static isIfStatement(node: Node): node is IfStatement;
|
1088 | |
1089 |
|
1090 |
|
1091 |
|
1092 | static isImplementsClauseableNode(node: Node): node is ImplementsClauseableNode & ImplementsClauseableNodeExtensionType;
|
1093 | |
1094 |
|
1095 |
|
1096 |
|
1097 | static isImportClause(node: Node): node is ImportClause;
|
1098 | |
1099 |
|
1100 |
|
1101 |
|
1102 | static isImportDeclaration(node: Node): node is ImportDeclaration;
|
1103 | |
1104 |
|
1105 |
|
1106 |
|
1107 | static isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
|
1108 | |
1109 |
|
1110 |
|
1111 |
|
1112 | static isImportExpression(node: Node): node is ImportExpression;
|
1113 | |
1114 |
|
1115 |
|
1116 |
|
1117 | static isImportSpecifier(node: Node): node is ImportSpecifier;
|
1118 | |
1119 |
|
1120 |
|
1121 |
|
1122 | static isImportTypeNode(node: Node): node is ImportTypeNode;
|
1123 | |
1124 |
|
1125 |
|
1126 |
|
1127 | static isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
|
1128 | |
1129 |
|
1130 |
|
1131 |
|
1132 | static isInitializerExpressionableNode(node: Node): node is InitializerExpressionableNode & InitializerExpressionableNodeExtensionType;
|
1133 | |
1134 |
|
1135 |
|
1136 |
|
1137 | static isInitializerGetExpressionableNode(node: Node): node is InitializerGetExpressionableNode & InitializerGetExpressionableNodeExtensionType;
|
1138 | |
1139 |
|
1140 |
|
1141 |
|
1142 | static isInitializerSetExpressionableNode(node: Node): node is InitializerSetExpressionableNode & InitializerSetExpressionableNodeExtensionType;
|
1143 | |
1144 |
|
1145 |
|
1146 |
|
1147 | static isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
|
1148 | |
1149 |
|
1150 |
|
1151 |
|
1152 | static isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
|
1153 | |
1154 |
|
1155 |
|
1156 |
|
1157 | static isIterationStatement(node: Node): node is IterationStatement;
|
1158 | |
1159 |
|
1160 |
|
1161 |
|
1162 | static isJSDoc(node: Node): node is JSDoc;
|
1163 | |
1164 |
|
1165 |
|
1166 |
|
1167 | static isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
|
1168 | |
1169 |
|
1170 |
|
1171 |
|
1172 | static isJSDocClassTag(node: Node): node is JSDocClassTag;
|
1173 | |
1174 |
|
1175 |
|
1176 |
|
1177 | static isJSDocParameterTag(node: Node): node is JSDocParameterTag;
|
1178 | |
1179 |
|
1180 |
|
1181 |
|
1182 | static isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag & JSDocPropertyLikeTagExtensionType;
|
1183 | |
1184 |
|
1185 |
|
1186 |
|
1187 | static isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
|
1188 | |
1189 |
|
1190 |
|
1191 |
|
1192 | static isJSDocReturnTag(node: Node): node is JSDocReturnTag;
|
1193 | |
1194 |
|
1195 |
|
1196 |
|
1197 | static isJSDocTag(node: Node): node is JSDocTag;
|
1198 | |
1199 |
|
1200 |
|
1201 |
|
1202 | static isJSDocTypeTag(node: Node): node is JSDocTypeTag;
|
1203 | |
1204 |
|
1205 |
|
1206 |
|
1207 | static isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
|
1208 | |
1209 |
|
1210 |
|
1211 |
|
1212 | static isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
|
1213 | |
1214 |
|
1215 |
|
1216 |
|
1217 | static isJSDocableNode(node: Node): node is JSDocableNode & JSDocableNodeExtensionType;
|
1218 | |
1219 |
|
1220 |
|
1221 |
|
1222 | static isJsxAttribute(node: Node): node is JsxAttribute;
|
1223 | |
1224 |
|
1225 |
|
1226 |
|
1227 | static isJsxAttributedNode(node: Node): node is JsxAttributedNode & JsxAttributedNodeExtensionType;
|
1228 | |
1229 |
|
1230 |
|
1231 |
|
1232 | static isJsxClosingElement(node: Node): node is JsxClosingElement;
|
1233 | |
1234 |
|
1235 |
|
1236 |
|
1237 | static isJsxClosingFragment(node: Node): node is JsxClosingFragment;
|
1238 | |
1239 |
|
1240 |
|
1241 |
|
1242 | static isJsxElement(node: Node): node is JsxElement;
|
1243 | |
1244 |
|
1245 |
|
1246 |
|
1247 | static isJsxExpression(node: Node): node is JsxExpression;
|
1248 | |
1249 |
|
1250 |
|
1251 |
|
1252 | static isJsxFragment(node: Node): node is JsxFragment;
|
1253 | |
1254 |
|
1255 |
|
1256 |
|
1257 | static isJsxOpeningElement(node: Node): node is JsxOpeningElement;
|
1258 | |
1259 |
|
1260 |
|
1261 |
|
1262 | static isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
|
1263 | |
1264 |
|
1265 |
|
1266 |
|
1267 | static isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
|
1268 | |
1269 |
|
1270 |
|
1271 |
|
1272 | static isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
|
1273 | |
1274 |
|
1275 |
|
1276 |
|
1277 | static isJsxTagNamedNode(node: Node): node is JsxTagNamedNode & JsxTagNamedNodeExtensionType;
|
1278 | |
1279 |
|
1280 |
|
1281 |
|
1282 | static isJsxText(node: Node): node is JsxText;
|
1283 | |
1284 |
|
1285 |
|
1286 |
|
1287 | static isLabeledStatement(node: Node): node is LabeledStatement;
|
1288 | |
1289 |
|
1290 |
|
1291 |
|
1292 | static isLeftHandSideExpression(node: Node): node is LeftHandSideExpression;
|
1293 | |
1294 |
|
1295 |
|
1296 |
|
1297 | static isLeftHandSideExpressionedNode(node: Node): node is LeftHandSideExpressionedNode & LeftHandSideExpressionedNodeExtensionType;
|
1298 | |
1299 |
|
1300 |
|
1301 |
|
1302 | static isLiteralExpression(node: Node): node is LiteralExpression;
|
1303 | |
1304 |
|
1305 |
|
1306 |
|
1307 | static isLiteralLikeNode(node: Node): node is LiteralLikeNode & LiteralLikeNodeExtensionType;
|
1308 | |
1309 |
|
1310 |
|
1311 |
|
1312 | static isLiteralTypeNode(node: Node): node is LiteralTypeNode;
|
1313 | |
1314 |
|
1315 |
|
1316 |
|
1317 | static isMemberExpression(node: Node): node is MemberExpression;
|
1318 | |
1319 |
|
1320 |
|
1321 |
|
1322 | static isMetaProperty(node: Node): node is MetaProperty;
|
1323 | |
1324 |
|
1325 |
|
1326 |
|
1327 | static isMethodDeclaration(node: Node): node is MethodDeclaration;
|
1328 | |
1329 |
|
1330 |
|
1331 |
|
1332 | static isMethodSignature(node: Node): node is MethodSignature;
|
1333 | |
1334 |
|
1335 |
|
1336 |
|
1337 | static isModifierableNode(node: Node): node is ModifierableNode & ModifierableNodeExtensionType;
|
1338 | |
1339 |
|
1340 |
|
1341 |
|
1342 | static isModuleBlock(node: Node): node is ModuleBlock;
|
1343 | |
1344 |
|
1345 |
|
1346 |
|
1347 | static isModuledNode(node: Node): node is ModuledNode & ModuledNodeExtensionType;
|
1348 | |
1349 |
|
1350 |
|
1351 |
|
1352 | static isNameableNode(node: Node): node is NameableNode & NameableNodeExtensionType;
|
1353 | |
1354 |
|
1355 |
|
1356 |
|
1357 | static isNamedExports(node: Node): node is NamedExports;
|
1358 | |
1359 |
|
1360 |
|
1361 |
|
1362 | static isNamedImports(node: Node): node is NamedImports;
|
1363 | |
1364 |
|
1365 |
|
1366 |
|
1367 | static isNamedNode(node: Node): node is NamedNode & NamedNodeExtensionType;
|
1368 | |
1369 |
|
1370 |
|
1371 |
|
1372 | static isNamespaceChildableNode(node: Node): node is NamespaceChildableNode & NamespaceChildableNodeExtensionType;
|
1373 | |
1374 |
|
1375 |
|
1376 |
|
1377 | static isNamespaceDeclaration(node: Node): node is NamespaceDeclaration;
|
1378 | |
1379 |
|
1380 |
|
1381 |
|
1382 | static isNamespaceImport(node: Node): node is NamespaceImport;
|
1383 | |
1384 |
|
1385 |
|
1386 |
|
1387 | static isNeverKeyword(node: Node): node is Expression;
|
1388 | |
1389 |
|
1390 |
|
1391 |
|
1392 | static isNewExpression(node: Node): node is NewExpression;
|
1393 | |
1394 |
|
1395 |
|
1396 |
|
1397 | static isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
|
1398 | |
1399 |
|
1400 |
|
1401 |
|
1402 | static isNonNullExpression(node: Node): node is NonNullExpression;
|
1403 | |
1404 |
|
1405 |
|
1406 |
|
1407 | static isNotEmittedStatement(node: Node): node is NotEmittedStatement;
|
1408 | |
1409 |
|
1410 |
|
1411 |
|
1412 | static isNullLiteral(node: Node): node is NullLiteral;
|
1413 | |
1414 |
|
1415 |
|
1416 |
|
1417 | static isNumberKeyword(node: Node): node is Expression;
|
1418 | |
1419 |
|
1420 |
|
1421 |
|
1422 | static isNumericLiteral(node: Node): node is NumericLiteral;
|
1423 | |
1424 |
|
1425 |
|
1426 |
|
1427 | static isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
|
1428 | |
1429 |
|
1430 |
|
1431 |
|
1432 | static isObjectKeyword(node: Node): node is Expression;
|
1433 | |
1434 |
|
1435 |
|
1436 |
|
1437 | static isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
|
1438 | |
1439 |
|
1440 |
|
1441 |
|
1442 | static isOmittedExpression(node: Node): node is OmittedExpression;
|
1443 | |
1444 |
|
1445 |
|
1446 |
|
1447 | static isOverloadableNode(node: Node): node is OverloadableNode & OverloadableNodeExtensionType;
|
1448 | |
1449 |
|
1450 |
|
1451 |
|
1452 | static isParameterDeclaration(node: Node): node is ParameterDeclaration;
|
1453 | |
1454 |
|
1455 |
|
1456 |
|
1457 | static isParameteredNode(node: Node): node is ParameteredNode & ParameteredNodeExtensionType;
|
1458 | |
1459 |
|
1460 |
|
1461 |
|
1462 | static isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
|
1463 | |
1464 |
|
1465 |
|
1466 |
|
1467 | static isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
|
1468 | |
1469 |
|
1470 |
|
1471 |
|
1472 | static isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
|
1473 | |
1474 |
|
1475 |
|
1476 |
|
1477 | static isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
|
1478 | |
1479 |
|
1480 |
|
1481 |
|
1482 | static isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
|
1483 | |
1484 |
|
1485 |
|
1486 |
|
1487 | static isPrimaryExpression(node: Node): node is PrimaryExpression;
|
1488 | |
1489 |
|
1490 |
|
1491 |
|
1492 | static isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
|
1493 | |
1494 |
|
1495 |
|
1496 |
|
1497 | static isPropertyAssignment(node: Node): node is PropertyAssignment;
|
1498 | |
1499 |
|
1500 |
|
1501 |
|
1502 | static isPropertyDeclaration(node: Node): node is PropertyDeclaration;
|
1503 | |
1504 |
|
1505 |
|
1506 |
|
1507 | static isPropertyNamedNode(node: Node): node is PropertyNamedNode & PropertyNamedNodeExtensionType;
|
1508 | |
1509 |
|
1510 |
|
1511 |
|
1512 | static isPropertySignature(node: Node): node is PropertySignature;
|
1513 | |
1514 |
|
1515 |
|
1516 |
|
1517 | static isQualifiedName(node: Node): node is QualifiedName;
|
1518 | |
1519 |
|
1520 |
|
1521 |
|
1522 | static isQuestionTokenableNode(node: Node): node is QuestionTokenableNode & QuestionTokenableNodeExtensionType;
|
1523 | |
1524 |
|
1525 |
|
1526 |
|
1527 | static isReadonlyableNode(node: Node): node is ReadonlyableNode & ReadonlyableNodeExtensionType;
|
1528 | |
1529 |
|
1530 |
|
1531 |
|
1532 | static isReferenceFindableNode(node: Node): node is ReferenceFindableNode & ReferenceFindableNodeExtensionType;
|
1533 | |
1534 |
|
1535 |
|
1536 |
|
1537 | static isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
|
1538 | |
1539 |
|
1540 |
|
1541 |
|
1542 | static isRenameableNode(node: Node): node is RenameableNode & RenameableNodeExtensionType;
|
1543 | |
1544 |
|
1545 |
|
1546 |
|
1547 | static isReturnStatement(node: Node): node is ReturnStatement;
|
1548 | |
1549 |
|
1550 |
|
1551 |
|
1552 | static isReturnTypedNode(node: Node): node is ReturnTypedNode & ReturnTypedNodeExtensionType;
|
1553 | |
1554 |
|
1555 |
|
1556 |
|
1557 | static isScopeableNode(node: Node): node is ScopeableNode & ScopeableNodeExtensionType;
|
1558 | |
1559 |
|
1560 |
|
1561 |
|
1562 | static isScopedNode(node: Node): node is ScopedNode & ScopedNodeExtensionType;
|
1563 | |
1564 |
|
1565 |
|
1566 |
|
1567 | static isSemicolonToken(node: Node): node is Node;
|
1568 | |
1569 |
|
1570 |
|
1571 |
|
1572 | static isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
|
1573 | |
1574 |
|
1575 |
|
1576 |
|
1577 | static isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
|
1578 | |
1579 |
|
1580 |
|
1581 |
|
1582 | static isSignaturedDeclaration(node: Node): node is SignaturedDeclaration & SignaturedDeclarationExtensionType;
|
1583 | |
1584 |
|
1585 |
|
1586 |
|
1587 | static isSourceFile(node: Node): node is SourceFile;
|
1588 | |
1589 |
|
1590 |
|
1591 |
|
1592 | static isSpreadAssignment(node: Node): node is SpreadAssignment;
|
1593 | |
1594 |
|
1595 |
|
1596 |
|
1597 | static isSpreadElement(node: Node): node is SpreadElement;
|
1598 | |
1599 |
|
1600 |
|
1601 |
|
1602 | static isStatement(node: Node): node is Statement;
|
1603 | |
1604 |
|
1605 |
|
1606 |
|
1607 | static isStatementedNode(node: Node): node is StatementedNode & StatementedNodeExtensionType;
|
1608 | |
1609 |
|
1610 |
|
1611 |
|
1612 | static isStaticableNode(node: Node): node is StaticableNode & StaticableNodeExtensionType;
|
1613 | |
1614 |
|
1615 |
|
1616 |
|
1617 | static isStringKeyword(node: Node): node is Expression;
|
1618 | |
1619 |
|
1620 |
|
1621 |
|
1622 | static isStringLiteral(node: Node): node is StringLiteral;
|
1623 | |
1624 |
|
1625 |
|
1626 |
|
1627 | static isSuperExpression(node: Node): node is SuperExpression;
|
1628 | |
1629 |
|
1630 |
|
1631 |
|
1632 | static isSwitchStatement(node: Node): node is SwitchStatement;
|
1633 | |
1634 |
|
1635 |
|
1636 |
|
1637 | static isSymbolKeyword(node: Node): node is Expression;
|
1638 | |
1639 |
|
1640 |
|
1641 |
|
1642 | static isSyntaxList(node: Node): node is SyntaxList;
|
1643 | |
1644 |
|
1645 |
|
1646 |
|
1647 | static isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
|
1648 | |
1649 |
|
1650 |
|
1651 |
|
1652 | static isTemplateExpression(node: Node): node is TemplateExpression;
|
1653 | |
1654 |
|
1655 |
|
1656 |
|
1657 | static isTemplateHead(node: Node): node is TemplateHead;
|
1658 | |
1659 |
|
1660 |
|
1661 |
|
1662 | static isTemplateMiddle(node: Node): node is TemplateMiddle;
|
1663 | |
1664 |
|
1665 |
|
1666 |
|
1667 | static isTemplateSpan(node: Node): node is TemplateSpan;
|
1668 | |
1669 |
|
1670 |
|
1671 |
|
1672 | static isTemplateTail(node: Node): node is TemplateTail;
|
1673 | |
1674 |
|
1675 |
|
1676 |
|
1677 | static isTextInsertableNode(node: Node): node is TextInsertableNode & TextInsertableNodeExtensionType;
|
1678 | |
1679 |
|
1680 |
|
1681 |
|
1682 | static isThisExpression(node: Node): node is ThisExpression;
|
1683 | |
1684 |
|
1685 |
|
1686 |
|
1687 | static isThrowStatement(node: Node): node is ThrowStatement;
|
1688 | |
1689 |
|
1690 |
|
1691 |
|
1692 | static isTrueKeyword(node: Node): node is BooleanLiteral;
|
1693 | |
1694 |
|
1695 |
|
1696 |
|
1697 | static isTryStatement(node: Node): node is TryStatement;
|
1698 | |
1699 |
|
1700 |
|
1701 |
|
1702 | static isTupleTypeNode(node: Node): node is TupleTypeNode;
|
1703 | |
1704 |
|
1705 |
|
1706 |
|
1707 | static isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
|
1708 | |
1709 |
|
1710 |
|
1711 |
|
1712 | static isTypeArgumentedNode(node: Node): node is TypeArgumentedNode & TypeArgumentedNodeExtensionType;
|
1713 | |
1714 |
|
1715 |
|
1716 |
|
1717 | static isTypeAssertion(node: Node): node is TypeAssertion;
|
1718 | |
1719 |
|
1720 |
|
1721 |
|
1722 | static isTypeElement(node: Node): node is TypeElement;
|
1723 | |
1724 |
|
1725 |
|
1726 |
|
1727 | static isTypeElementMemberedNode(node: Node): node is TypeElementMemberedNode & TypeElementMemberedNodeExtensionType;
|
1728 | |
1729 |
|
1730 |
|
1731 |
|
1732 | static isTypeLiteralNode(node: Node): node is TypeLiteralNode;
|
1733 | |
1734 |
|
1735 |
|
1736 |
|
1737 | static isTypeNode(node: Node): node is TypeNode;
|
1738 | |
1739 |
|
1740 |
|
1741 |
|
1742 | static isTypeOfExpression(node: Node): node is TypeOfExpression;
|
1743 | |
1744 |
|
1745 |
|
1746 |
|
1747 | static isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
|
1748 | |
1749 |
|
1750 |
|
1751 |
|
1752 | static isTypeParameteredNode(node: Node): node is TypeParameteredNode & TypeParameteredNodeExtensionType;
|
1753 | |
1754 |
|
1755 |
|
1756 |
|
1757 | static isTypeReferenceNode(node: Node): node is TypeReferenceNode;
|
1758 | |
1759 |
|
1760 |
|
1761 |
|
1762 | static isTypedNode(node: Node): node is TypedNode & TypedNodeExtensionType;
|
1763 | |
1764 |
|
1765 |
|
1766 |
|
1767 | static isUnaryExpression(node: Node): node is UnaryExpression;
|
1768 | |
1769 |
|
1770 |
|
1771 |
|
1772 | static isUnaryExpressionedNode(node: Node): node is UnaryExpressionedNode & UnaryExpressionedNodeExtensionType;
|
1773 | |
1774 |
|
1775 |
|
1776 |
|
1777 | static isUndefinedKeyword(node: Node): node is Expression;
|
1778 | |
1779 |
|
1780 |
|
1781 |
|
1782 | static isUnionTypeNode(node: Node): node is UnionTypeNode;
|
1783 | |
1784 |
|
1785 |
|
1786 |
|
1787 | static isUnwrappableNode(node: Node): node is UnwrappableNode & UnwrappableNodeExtensionType;
|
1788 | |
1789 |
|
1790 |
|
1791 |
|
1792 | static isUpdateExpression(node: Node): node is UpdateExpression;
|
1793 | |
1794 |
|
1795 |
|
1796 |
|
1797 | static isVariableDeclaration(node: Node): node is VariableDeclaration;
|
1798 | |
1799 |
|
1800 |
|
1801 |
|
1802 | static isVariableDeclarationList(node: Node): node is VariableDeclarationList;
|
1803 | |
1804 |
|
1805 |
|
1806 |
|
1807 | static isVariableStatement(node: Node): node is VariableStatement;
|
1808 | |
1809 |
|
1810 |
|
1811 |
|
1812 | static isVoidExpression(node: Node): node is VoidExpression;
|
1813 | |
1814 |
|
1815 |
|
1816 |
|
1817 | static isWhileStatement(node: Node): node is WhileStatement;
|
1818 | |
1819 |
|
1820 |
|
1821 |
|
1822 | static isWithStatement(node: Node): node is WithStatement;
|
1823 | |
1824 |
|
1825 |
|
1826 |
|
1827 | static isYieldExpression(node: Node): node is YieldExpression;
|
1828 | }
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 | export declare class WriterFunctions {
|
1835 | private constructor();
|
1836 | /**
|
1837 | * Gets a writer function for writing the provided object as an object literal expression.
|
1838 | * @param obj - Object to write.
|
1839 | */
|
1840 | static object(obj: {
|
1841 | [key: string]: string | number | WriterFunction | undefined;
|
1842 | }): WriterFunction;
|
1843 | }
|
1844 |
|
1845 | export declare type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
|
1846 |
|
1847 | export declare type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
|
1848 |
|
1849 | export declare type ArrayBindingElement = BindingElement | OmittedExpression;
|
1850 |
|
1851 | export declare type BindingName = Identifier | BindingPattern;
|
1852 |
|
1853 | export declare type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
|
1854 |
|
1855 | export declare type EntityName = Identifier | QualifiedName;
|
1856 |
|
1857 | export declare type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
1858 |
|
1859 | export declare type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
|
1860 |
|
1861 | export declare type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
|
1862 |
|
1863 | export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
1864 | getExpression(): JsxTagNameExpression;
|
1865 | }
|
1866 |
|
1867 | export declare type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
|
1868 |
|
1869 | export declare type CaseOrDefaultClause = CaseClause | DefaultClause;
|
1870 |
|
1871 | export declare type ModuleReference = EntityName | ExternalModuleReference;
|
1872 |
|
1873 | export declare type TypeElementTypes = PropertySignature | MethodSignature | ConstructSignatureDeclaration | CallSignatureDeclaration | IndexSignatureDeclaration;
|
1874 |
|
1875 | export declare type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
|
1876 |
|
1877 | export declare function AmbientableNode<T extends Constructor<AmbientableNodeExtensionType>>(Base: T): Constructor<AmbientableNode> & T;
|
1878 |
|
1879 | export interface AmbientableNode {
|
1880 | |
1881 |
|
1882 |
|
1883 | hasDeclareKeyword(): boolean;
|
1884 | |
1885 |
|
1886 |
|
1887 | getDeclareKeyword(): Node | undefined;
|
1888 | |
1889 |
|
1890 |
|
1891 | getDeclareKeywordOrThrow(): Node;
|
1892 | |
1893 |
|
1894 |
|
1895 | isAmbient(): boolean;
|
1896 | |
1897 |
|
1898 |
|
1899 |
|
1900 | setHasDeclareKeyword(value?: boolean): this;
|
1901 | }
|
1902 |
|
1903 | declare type AmbientableNodeExtensionType = Node & ModifierableNode;
|
1904 |
|
1905 | export declare function ArgumentedNode<T extends Constructor<ArgumentedNodeExtensionType>>(Base: T): Constructor<ArgumentedNode> & T;
|
1906 |
|
1907 | export interface ArgumentedNode {
|
1908 | |
1909 |
|
1910 |
|
1911 | getArguments(): Node[];
|
1912 | |
1913 |
|
1914 |
|
1915 |
|
1916 | addArgument(argumentText: string | WriterFunction): Node;
|
1917 | |
1918 |
|
1919 |
|
1920 |
|
1921 | addArguments(argumentTexts: ReadonlyArray<string | WriterFunction> | WriterFunction): Node[];
|
1922 | |
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 | insertArgument(index: number, argumentText: string | WriterFunction): Node;
|
1928 | |
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 | insertArguments(index: number, argumentTexts: ReadonlyArray<string | WriterFunction> | WriterFunction): Node[];
|
1934 | |
1935 |
|
1936 |
|
1937 |
|
1938 | removeArgument(arg: Node): this;
|
1939 | |
1940 |
|
1941 |
|
1942 |
|
1943 | removeArgument(index: number): this;
|
1944 | }
|
1945 |
|
1946 | declare type ArgumentedNodeExtensionType = Node<ts.Node & {
|
1947 | arguments: ts.NodeArray<ts.Node>;
|
1948 | }>;
|
1949 |
|
1950 | export declare function AsyncableNode<T extends Constructor<AsyncableNodeExtensionType>>(Base: T): Constructor<AsyncableNode> & T;
|
1951 |
|
1952 | export interface AsyncableNode {
|
1953 | |
1954 |
|
1955 |
|
1956 | isAsync(): boolean;
|
1957 | |
1958 |
|
1959 |
|
1960 | getAsyncKeyword(): Node<ts.Modifier> | undefined;
|
1961 | |
1962 |
|
1963 |
|
1964 | getAsyncKeywordOrThrow(): Node<ts.Modifier>;
|
1965 | |
1966 |
|
1967 |
|
1968 |
|
1969 | setIsAsync(value: boolean): this;
|
1970 | }
|
1971 |
|
1972 | declare type AsyncableNodeExtensionType = Node & ModifierableNode;
|
1973 |
|
1974 | export declare function AwaitableNode<T extends Constructor<AwaitableNodeExtensionType>>(Base: T): Constructor<AwaitableNode> & T;
|
1975 |
|
1976 | export interface AwaitableNode {
|
1977 | |
1978 |
|
1979 |
|
1980 | isAwaited(): boolean;
|
1981 | |
1982 |
|
1983 |
|
1984 | getAwaitKeyword(): Node<ts.AwaitKeywordToken> | undefined;
|
1985 | |
1986 |
|
1987 |
|
1988 | getAwaitKeywordOrThrow(): Node<ts.AwaitKeywordToken>;
|
1989 | |
1990 |
|
1991 |
|
1992 |
|
1993 | setIsAwaited(value: boolean): this;
|
1994 | }
|
1995 |
|
1996 | declare type AwaitableNodeExtensionType = Node<ts.Node & {
|
1997 | awaitModifier?: ts.AwaitKeywordToken;
|
1998 | }>;
|
1999 |
|
2000 | export declare function BodiedNode<T extends Constructor<BodiedNodeExtensionType>>(Base: T): Constructor<BodiedNode> & T;
|
2001 |
|
2002 | export interface BodiedNode {
|
2003 | |
2004 |
|
2005 |
|
2006 | getBody(): Node;
|
2007 | |
2008 |
|
2009 |
|
2010 |
|
2011 | setBodyText(textOrWriterFunction: string | WriterFunction): this;
|
2012 | |
2013 |
|
2014 |
|
2015 | getBodyText(): string;
|
2016 | }
|
2017 |
|
2018 | declare type BodiedNodeExtensionType = Node<ts.Node & {
|
2019 | body: ts.Node;
|
2020 | }>;
|
2021 |
|
2022 | export declare function BodyableNode<T extends Constructor<BodyableNodeExtensionType>>(Base: T): Constructor<BodyableNode> & T;
|
2023 |
|
2024 | export interface BodyableNode {
|
2025 | |
2026 |
|
2027 |
|
2028 | getBodyOrThrow(): Node;
|
2029 | |
2030 |
|
2031 |
|
2032 | getBody(): Node | undefined;
|
2033 | |
2034 |
|
2035 |
|
2036 | getBodyText(): string | undefined;
|
2037 | |
2038 |
|
2039 |
|
2040 | hasBody(): boolean;
|
2041 | |
2042 |
|
2043 |
|
2044 |
|
2045 | setBodyText(textOrWriterFunction: string | WriterFunction): this;
|
2046 | |
2047 |
|
2048 |
|
2049 | addBody(): this;
|
2050 | |
2051 |
|
2052 |
|
2053 | removeBody(): this;
|
2054 | }
|
2055 |
|
2056 | declare type BodyableNodeExtensionType = Node<ts.Node & {
|
2057 | body?: ts.Node;
|
2058 | }>;
|
2059 |
|
2060 | export declare function ChildOrderableNode<T extends Constructor<ChildOrderableNodeExtensionType>>(Base: T): Constructor<ChildOrderableNode> & T;
|
2061 |
|
2062 | export interface ChildOrderableNode {
|
2063 | |
2064 |
|
2065 |
|
2066 | setOrder(order: number): this;
|
2067 | }
|
2068 |
|
2069 | declare type ChildOrderableNodeExtensionType = Node;
|
2070 |
|
2071 | export declare function DecoratableNode<T extends Constructor<DecoratableNodeExtensionType>>(Base: T): Constructor<DecoratableNode> & T;
|
2072 |
|
2073 | export interface DecoratableNode {
|
2074 | |
2075 |
|
2076 |
|
2077 |
|
2078 | getDecorator(name: string): Decorator | undefined;
|
2079 | |
2080 |
|
2081 |
|
2082 |
|
2083 | getDecorator(findFunction: (declaration: Decorator) => boolean): Decorator | undefined;
|
2084 | |
2085 |
|
2086 |
|
2087 |
|
2088 | getDecoratorOrThrow(name: string): Decorator;
|
2089 | |
2090 |
|
2091 |
|
2092 |
|
2093 | getDecoratorOrThrow(findFunction: (declaration: Decorator) => boolean): Decorator;
|
2094 | |
2095 |
|
2096 |
|
2097 | getDecorators(): Decorator[];
|
2098 | |
2099 |
|
2100 |
|
2101 |
|
2102 | addDecorator(structure: DecoratorStructure): Decorator;
|
2103 | |
2104 |
|
2105 |
|
2106 |
|
2107 | addDecorators(structures: ReadonlyArray<DecoratorStructure>): Decorator[];
|
2108 | |
2109 |
|
2110 |
|
2111 |
|
2112 |
|
2113 | insertDecorator(index: number, structure: DecoratorStructure): Decorator;
|
2114 | |
2115 |
|
2116 |
|
2117 |
|
2118 |
|
2119 | insertDecorators(index: number, structures: ReadonlyArray<DecoratorStructure>): Decorator[];
|
2120 | }
|
2121 |
|
2122 | declare type DecoratableNodeExtensionType = Node<ts.Node>;
|
2123 |
|
2124 | export declare function ExclamationTokenableNode<T extends Constructor<ExclamationTokenableNodeExtensionType>>(Base: T): Constructor<ExclamationTokenableNode> & T;
|
2125 |
|
2126 | export interface ExclamationTokenableNode {
|
2127 | |
2128 |
|
2129 |
|
2130 | hasExclamationToken(): boolean;
|
2131 | |
2132 |
|
2133 |
|
2134 | getExclamationTokenNode(): Node<ts.ExclamationToken> | undefined;
|
2135 | |
2136 |
|
2137 |
|
2138 | getExclamationTokenNodeOrThrow(): Node<ts.ExclamationToken>;
|
2139 | |
2140 |
|
2141 |
|
2142 |
|
2143 | setHasExclamationToken(value: boolean): this;
|
2144 | }
|
2145 |
|
2146 | declare type ExclamationTokenableNodeExtensionType = Node<ts.Node & {
|
2147 | exclamationToken?: ts.ExclamationToken;
|
2148 | }>;
|
2149 |
|
2150 | export declare function ExportableNode<T extends Constructor<ExportableNodeExtensionType>>(Base: T): Constructor<ExportableNode> & T;
|
2151 |
|
2152 | export interface ExportableNode {
|
2153 | |
2154 |
|
2155 |
|
2156 | hasExportKeyword(): boolean;
|
2157 | |
2158 |
|
2159 |
|
2160 | getExportKeyword(): Node | undefined;
|
2161 | |
2162 |
|
2163 |
|
2164 | getExportKeywordOrThrow(): Node;
|
2165 | |
2166 |
|
2167 |
|
2168 | hasDefaultKeyword(): boolean;
|
2169 | |
2170 |
|
2171 |
|
2172 | getDefaultKeyword(): Node | undefined;
|
2173 | |
2174 |
|
2175 |
|
2176 | getDefaultKeywordOrThrow(): Node;
|
2177 | |
2178 |
|
2179 |
|
2180 | isExported(): boolean;
|
2181 | |
2182 |
|
2183 |
|
2184 | isDefaultExport(): boolean;
|
2185 | |
2186 |
|
2187 |
|
2188 | isNamedExport(): boolean;
|
2189 | |
2190 |
|
2191 |
|
2192 |
|
2193 | setIsDefaultExport(value: boolean): this;
|
2194 | |
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 | setIsExported(value: boolean): this;
|
2201 | }
|
2202 |
|
2203 | declare type ExportableNodeExtensionType = Node & ModifierableNode;
|
2204 |
|
2205 | export declare function ExtendsClauseableNode<T extends Constructor<ExtendsClauseableNodeExtensionType>>(Base: T): Constructor<ExtendsClauseableNode> & T;
|
2206 |
|
2207 | export interface ExtendsClauseableNode {
|
2208 | |
2209 |
|
2210 |
|
2211 | getExtends(): ExpressionWithTypeArguments[];
|
2212 | |
2213 |
|
2214 |
|
2215 |
|
2216 | addExtends(texts: ReadonlyArray<string | WriterFunction> | WriterFunction): ExpressionWithTypeArguments[];
|
2217 | |
2218 |
|
2219 |
|
2220 |
|
2221 | addExtends(text: string): ExpressionWithTypeArguments;
|
2222 | |
2223 |
|
2224 |
|
2225 |
|
2226 | insertExtends(index: number, texts: ReadonlyArray<string | WriterFunction> | WriterFunction): ExpressionWithTypeArguments[];
|
2227 | |
2228 |
|
2229 |
|
2230 |
|
2231 | insertExtends(index: number, text: string): ExpressionWithTypeArguments;
|
2232 | |
2233 |
|
2234 |
|
2235 |
|
2236 | removeExtends(index: number): this;
|
2237 | |
2238 |
|
2239 |
|
2240 |
|
2241 | removeExtends(extendsNode: ExpressionWithTypeArguments): this;
|
2242 | }
|
2243 |
|
2244 | declare type ExtendsClauseableNodeExtensionType = Node & HeritageClauseableNode;
|
2245 |
|
2246 | export declare function GeneratorableNode<T extends Constructor<GeneratorableNodeExtensionType>>(Base: T): Constructor<GeneratorableNode> & T;
|
2247 |
|
2248 | export interface GeneratorableNode {
|
2249 | |
2250 |
|
2251 |
|
2252 | isGenerator(): boolean;
|
2253 | |
2254 |
|
2255 |
|
2256 | getAsteriskToken(): Node<ts.AsteriskToken> | undefined;
|
2257 | |
2258 |
|
2259 |
|
2260 | getAsteriskTokenOrThrow(): Node<ts.AsteriskToken>;
|
2261 | |
2262 |
|
2263 |
|
2264 |
|
2265 | setIsGenerator(value: boolean): this;
|
2266 | }
|
2267 |
|
2268 | declare type GeneratorableNodeExtensionType = Node<ts.Node & {
|
2269 | asteriskToken?: ts.AsteriskToken;
|
2270 | }>;
|
2271 |
|
2272 | export declare function HeritageClauseableNode<T extends Constructor<HeritageClauseableNodeExtensionType>>(Base: T): Constructor<HeritageClauseableNode> & T;
|
2273 |
|
2274 | export interface HeritageClauseableNode {
|
2275 | |
2276 |
|
2277 |
|
2278 | getHeritageClauses(): HeritageClause[];
|
2279 | |
2280 |
|
2281 |
|
2282 |
|
2283 | getHeritageClauseByKind(kind: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword): HeritageClause | undefined;
|
2284 | |
2285 |
|
2286 |
|
2287 |
|
2288 | getHeritageClauseByKindOrThrow(kind: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword): HeritageClause;
|
2289 | }
|
2290 |
|
2291 | declare type HeritageClauseableNodeExtensionType = Node<ts.Node & {
|
2292 | heritageClauses?: ts.NodeArray<ts.HeritageClause>;
|
2293 | }>;
|
2294 |
|
2295 | export declare function ImplementsClauseableNode<T extends Constructor<ImplementsClauseableNodeExtensionType>>(Base: T): Constructor<ImplementsClauseableNode> & T;
|
2296 |
|
2297 | export interface ImplementsClauseableNode {
|
2298 | |
2299 |
|
2300 |
|
2301 | getImplements(): ExpressionWithTypeArguments[];
|
2302 | |
2303 |
|
2304 |
|
2305 |
|
2306 | addImplements(text: string): ExpressionWithTypeArguments;
|
2307 | |
2308 |
|
2309 |
|
2310 |
|
2311 | addImplements(text: ReadonlyArray<string | WriterFunction> | WriterFunction): ExpressionWithTypeArguments[];
|
2312 | |
2313 |
|
2314 |
|
2315 |
|
2316 | insertImplements(index: number, texts: ReadonlyArray<string | WriterFunction> | WriterFunction): ExpressionWithTypeArguments[];
|
2317 | |
2318 |
|
2319 |
|
2320 |
|
2321 | insertImplements(index: number, text: string): ExpressionWithTypeArguments;
|
2322 | |
2323 |
|
2324 |
|
2325 |
|
2326 | removeImplements(index: number): this;
|
2327 | |
2328 |
|
2329 |
|
2330 |
|
2331 | removeImplements(implementsNode: ExpressionWithTypeArguments): this;
|
2332 | }
|
2333 |
|
2334 | declare type ImplementsClauseableNodeExtensionType = Node & HeritageClauseableNode;
|
2335 |
|
2336 | export declare function InitializerExpressionableNode<T extends Constructor<InitializerExpressionableNodeExtensionType>>(Base: T): Constructor<InitializerExpressionableNode> & T;
|
2337 |
|
2338 | export interface InitializerExpressionableNode extends InitializerGetExpressionableNode, InitializerSetExpressionableNode {
|
2339 | }
|
2340 |
|
2341 | declare type InitializerExpressionableNodeExtensionType = Node<ts.Node & {
|
2342 | initializer?: ts.Expression;
|
2343 | }>;
|
2344 |
|
2345 | export declare function InitializerGetExpressionableNode<T extends Constructor<InitializerGetExpressionableNodeExtensionType>>(Base: T): Constructor<InitializerGetExpressionableNode> & T;
|
2346 |
|
2347 | export interface InitializerGetExpressionableNode {
|
2348 | |
2349 |
|
2350 |
|
2351 | hasInitializer(): boolean;
|
2352 | |
2353 |
|
2354 |
|
2355 | getInitializer(): Expression | undefined;
|
2356 | |
2357 |
|
2358 |
|
2359 | getInitializerIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToExpressionMappings[TKind];
|
2360 | |
2361 |
|
2362 |
|
2363 | getInitializerIfKind<TKind extends SyntaxKind>(kind: TKind): KindToExpressionMappings[TKind] | undefined;
|
2364 | |
2365 |
|
2366 |
|
2367 | getInitializerOrThrow(): Expression;
|
2368 | }
|
2369 |
|
2370 | declare type InitializerGetExpressionableNodeExtensionType = Node<ts.Node & {
|
2371 | initializer?: ts.Expression;
|
2372 | }>;
|
2373 |
|
2374 | export declare function InitializerSetExpressionableNode<T extends Constructor<InitializerSetExpressionableNodeExtensionType>>(Base: T): Constructor<InitializerSetExpressionableNode> & T;
|
2375 |
|
2376 | export interface InitializerSetExpressionableNode {
|
2377 | |
2378 |
|
2379 |
|
2380 | removeInitializer(): this;
|
2381 | |
2382 |
|
2383 |
|
2384 |
|
2385 | setInitializer(textOrWriterFunction: string | WriterFunction): this;
|
2386 | }
|
2387 |
|
2388 | declare type InitializerSetExpressionableNodeExtensionType = Node<ts.Node & {
|
2389 | initializer?: ts.Expression;
|
2390 | }> & InitializerGetExpressionableNode;
|
2391 |
|
2392 | export declare function JSDocableNode<T extends Constructor<JSDocableNodeExtensionType>>(Base: T): Constructor<JSDocableNode> & T;
|
2393 |
|
2394 | export interface JSDocableNode {
|
2395 | |
2396 |
|
2397 |
|
2398 | getJsDocs(): JSDoc[];
|
2399 | |
2400 |
|
2401 |
|
2402 |
|
2403 | addJsDoc(structure: JSDocStructure | string | WriterFunction): JSDoc;
|
2404 | |
2405 |
|
2406 |
|
2407 |
|
2408 | addJsDocs(structures: ReadonlyArray<JSDocStructure | string | WriterFunction>): JSDoc[];
|
2409 | |
2410 |
|
2411 |
|
2412 |
|
2413 |
|
2414 | insertJsDoc(index: number, structure: JSDocStructure | string | WriterFunction): JSDoc;
|
2415 | |
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 | insertJsDocs(index: number, structures: ReadonlyArray<JSDocStructure | string | WriterFunction>): JSDoc[];
|
2421 | }
|
2422 |
|
2423 | declare type JSDocableNodeExtensionType = Node<ts.Node & {
|
2424 | jsDoc?: ts.NodeArray<ts.JSDoc>;
|
2425 | }>;
|
2426 |
|
2427 | export declare function LiteralLikeNode<T extends Constructor<LiteralLikeNodeExtensionType>>(Base: T): Constructor<LiteralLikeNode> & T;
|
2428 |
|
2429 | export interface LiteralLikeNode {
|
2430 | |
2431 |
|
2432 |
|
2433 | getLiteralText(): string;
|
2434 | |
2435 |
|
2436 |
|
2437 | isTerminated(): boolean;
|
2438 | |
2439 |
|
2440 |
|
2441 | hasExtendedUnicodeEscape(): boolean;
|
2442 | }
|
2443 |
|
2444 | declare type LiteralLikeNodeExtensionType = Node<ts.LiteralLikeNode>;
|
2445 |
|
2446 | export declare function ModifierableNode<T extends Constructor<ModifierableNodeExtensionType>>(Base: T): Constructor<ModifierableNode> & T;
|
2447 |
|
2448 | export interface ModifierableNode {
|
2449 | |
2450 |
|
2451 |
|
2452 | getModifiers(): Node[];
|
2453 | |
2454 |
|
2455 |
|
2456 |
|
2457 | getFirstModifierByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
2458 | |
2459 |
|
2460 |
|
2461 |
|
2462 | getFirstModifierByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
2463 | |
2464 |
|
2465 |
|
2466 |
|
2467 | hasModifier(kind: SyntaxKind): boolean;
|
2468 | |
2469 |
|
2470 |
|
2471 |
|
2472 | hasModifier(text: ModifierTexts): boolean;
|
2473 | |
2474 |
|
2475 |
|
2476 |
|
2477 |
|
2478 | toggleModifier(text: ModifierTexts, value?: boolean): this;
|
2479 | }
|
2480 |
|
2481 | declare type ModifierableNodeExtensionType = Node;
|
2482 |
|
2483 | export declare type ModifierTexts = "export" | "default" | "declare" | "abstract" | "public" | "protected" | "private" | "readonly" | "static" | "async" | "const";
|
2484 |
|
2485 | export declare function ModuledNode<T extends Constructor<ModuledNodeExtensionType>>(Base: T): Constructor<ModuledNode> & T;
|
2486 |
|
2487 | export interface ModuledNode {
|
2488 | |
2489 |
|
2490 |
|
2491 |
|
2492 | addImportDeclaration(structure: ImportDeclarationStructure): ImportDeclaration;
|
2493 | |
2494 |
|
2495 |
|
2496 |
|
2497 | addImportDeclarations(structures: ReadonlyArray<ImportDeclarationStructure>): ImportDeclaration[];
|
2498 | |
2499 |
|
2500 |
|
2501 |
|
2502 |
|
2503 | insertImportDeclaration(index: number, structure: ImportDeclarationStructure): ImportDeclaration;
|
2504 | |
2505 |
|
2506 |
|
2507 |
|
2508 |
|
2509 | insertImportDeclarations(index: number, structures: ReadonlyArray<ImportDeclarationStructure>): ImportDeclaration[];
|
2510 | |
2511 |
|
2512 |
|
2513 |
|
2514 | getImportDeclaration(condition: (importDeclaration: ImportDeclaration) => boolean): ImportDeclaration | undefined;
|
2515 | |
2516 |
|
2517 |
|
2518 |
|
2519 | getImportDeclaration(moduleSpecifier: string): ImportDeclaration | undefined;
|
2520 | |
2521 |
|
2522 |
|
2523 |
|
2524 | getImportDeclarationOrThrow(condition: (importDeclaration: ImportDeclaration) => boolean): ImportDeclaration;
|
2525 | |
2526 |
|
2527 |
|
2528 |
|
2529 | getImportDeclarationOrThrow(moduleSpecifier: string): ImportDeclaration;
|
2530 | |
2531 |
|
2532 |
|
2533 | getImportDeclarations(): ImportDeclaration[];
|
2534 | |
2535 |
|
2536 |
|
2537 |
|
2538 | addExportDeclaration(structure: ExportDeclarationStructure): ExportDeclaration;
|
2539 | |
2540 |
|
2541 |
|
2542 |
|
2543 | addExportDeclarations(structures: ReadonlyArray<ExportDeclarationStructure>): ExportDeclaration[];
|
2544 | |
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 | insertExportDeclaration(index: number, structure: ExportDeclarationStructure): ExportDeclaration;
|
2550 | |
2551 |
|
2552 |
|
2553 |
|
2554 |
|
2555 | insertExportDeclarations(index: number, structures: ReadonlyArray<ExportDeclarationStructure>): ExportDeclaration[];
|
2556 | getExportDeclaration(condition: (exportDeclaration: ExportDeclaration) => boolean): ExportDeclaration | undefined;
|
2557 | |
2558 |
|
2559 |
|
2560 |
|
2561 | getExportDeclaration(moduleSpecifier: string): ExportDeclaration | undefined;
|
2562 | |
2563 |
|
2564 |
|
2565 |
|
2566 | getExportDeclarationOrThrow(condition: (exportDeclaration: ExportDeclaration) => boolean): ExportDeclaration;
|
2567 | |
2568 |
|
2569 |
|
2570 |
|
2571 | getExportDeclarationOrThrow(moduleSpecifier: string): ExportDeclaration;
|
2572 | |
2573 |
|
2574 |
|
2575 | getExportDeclarations(): ExportDeclaration[];
|
2576 | |
2577 |
|
2578 |
|
2579 |
|
2580 | addExportAssignment(structure: ExportAssignmentStructure): ExportAssignment;
|
2581 | |
2582 |
|
2583 |
|
2584 |
|
2585 | addExportAssignments(structures: ReadonlyArray<ExportAssignmentStructure>): ExportAssignment[];
|
2586 | |
2587 |
|
2588 |
|
2589 |
|
2590 |
|
2591 | insertExportAssignment(index: number, structure: ExportAssignmentStructure): ExportAssignment;
|
2592 | |
2593 |
|
2594 |
|
2595 |
|
2596 |
|
2597 | insertExportAssignments(index: number, structures: ReadonlyArray<ExportAssignmentStructure>): ExportAssignment[];
|
2598 | |
2599 |
|
2600 |
|
2601 |
|
2602 | getExportAssignment(condition: (exportAssignment: ExportAssignment) => boolean): ExportAssignment | undefined;
|
2603 | |
2604 |
|
2605 |
|
2606 |
|
2607 | getExportAssignmentOrThrow(condition: (exportAssignment: ExportAssignment) => boolean): ExportAssignment;
|
2608 | |
2609 |
|
2610 |
|
2611 | getExportAssignments(): ExportAssignment[];
|
2612 | |
2613 |
|
2614 |
|
2615 | getDefaultExportSymbol(): Symbol | undefined;
|
2616 | |
2617 |
|
2618 |
|
2619 | getDefaultExportSymbolOrThrow(): Symbol;
|
2620 | |
2621 |
|
2622 |
|
2623 | getExportSymbols(): Symbol[];
|
2624 | |
2625 |
|
2626 |
|
2627 |
|
2628 |
|
2629 |
|
2630 | getExportedDeclarations(): Node[];
|
2631 | |
2632 |
|
2633 |
|
2634 | removeDefaultExport(defaultExportSymbol?: Symbol | undefined): this;
|
2635 | }
|
2636 |
|
2637 | declare type ModuledNodeExtensionType = Node<ts.SourceFile | ts.NamespaceDeclaration> & StatementedNode;
|
2638 |
|
2639 | export declare function BindingNamedNode<T extends Constructor<BindingNamedNodeExtensionType>>(Base: T): Constructor<BindingNamedNode> & T;
|
2640 |
|
2641 | export interface BindingNamedNode extends BindingNamedNodeSpecific, ReferenceFindableNode, RenameableNode {
|
2642 | }
|
2643 |
|
2644 | declare type BindingNamedNodeExtensionType = NamedNodeBaseExtensionType<ts.BindingName>;
|
2645 |
|
2646 | export declare type BindingNamedNodeSpecific = NamedNodeSpecificBase<BindingName>;
|
2647 |
|
2648 | export declare function DeclarationNamedNode<T extends Constructor<DeclarationNamedNodeExtensionType>>(Base: T): Constructor<DeclarationNamedNode> & T;
|
2649 |
|
2650 | export interface DeclarationNamedNode extends DeclarationNamedNodeSpecific, ReferenceFindableNode, RenameableNode {
|
2651 | }
|
2652 |
|
2653 | declare type DeclarationNamedNodeExtensionType = Node<ts.NamedDeclaration>;
|
2654 |
|
2655 | export interface DeclarationNamedNodeSpecific {
|
2656 | |
2657 |
|
2658 |
|
2659 | getNameNode(): Identifier | undefined;
|
2660 | |
2661 |
|
2662 |
|
2663 | getNameNodeOrThrow(): Identifier;
|
2664 | |
2665 |
|
2666 |
|
2667 | getName(): string | undefined;
|
2668 | |
2669 |
|
2670 |
|
2671 | getNameOrThrow(): string;
|
2672 | }
|
2673 |
|
2674 | export declare function NameableNode<T extends Constructor<NameableNodeExtensionType>>(Base: T): Constructor<NameableNode> & T;
|
2675 |
|
2676 | export interface NameableNode extends NameableNodeSpecific, ReferenceFindableNode, RenameableNode {
|
2677 | }
|
2678 |
|
2679 | declare type NameableNodeExtensionType = Node<ts.Node & {
|
2680 | name?: ts.Identifier;
|
2681 | }>;
|
2682 |
|
2683 | export interface NameableNodeSpecific {
|
2684 | |
2685 |
|
2686 |
|
2687 | getNameNode(): Identifier | undefined;
|
2688 | |
2689 |
|
2690 |
|
2691 | getNameNodeOrThrow(): Identifier;
|
2692 | |
2693 |
|
2694 |
|
2695 | getName(): string | undefined;
|
2696 | |
2697 |
|
2698 |
|
2699 | getNameOrThrow(): string;
|
2700 | |
2701 |
|
2702 |
|
2703 | removeName(): this;
|
2704 | }
|
2705 |
|
2706 | export declare function NamedNodeBase<TCompilerNode extends ts.Node, U extends Constructor<NamedNodeBaseExtensionType<TCompilerNode>>>(Base: U): Constructor<NamedNodeSpecificBase<CompilerNodeToWrappedType<TCompilerNode>>> & U;
|
2707 |
|
2708 | export interface NamedNodeSpecificBase<TNode extends Node> {
|
2709 | |
2710 |
|
2711 |
|
2712 | getNameNode(): TNode;
|
2713 | |
2714 |
|
2715 |
|
2716 | getName(): string;
|
2717 | }
|
2718 |
|
2719 | declare type NamedNodeBaseExtensionType<TCompilerNode extends ts.Node> = Node<ts.Node & {
|
2720 | name: TCompilerNode;
|
2721 | }>;
|
2722 |
|
2723 | export declare function NamedNode<T extends Constructor<NamedNodeExtensionType>>(Base: T): Constructor<NamedNode> & T;
|
2724 |
|
2725 | export interface NamedNode extends NamedNodeSpecific, ReferenceFindableNode, RenameableNode {
|
2726 | }
|
2727 |
|
2728 | declare type NamedNodeExtensionType = NamedNodeBaseExtensionType<ts.Identifier>;
|
2729 |
|
2730 | export declare type NamedNodeSpecific = NamedNodeSpecificBase<Identifier>;
|
2731 |
|
2732 | export declare function PropertyNamedNode<T extends Constructor<PropertyNamedNodeExtensionType>>(Base: T): Constructor<PropertyNamedNode> & T;
|
2733 |
|
2734 | export interface PropertyNamedNode extends PropertyNamedNodeSpecific, ReferenceFindableNode, RenameableNode {
|
2735 | }
|
2736 |
|
2737 | declare type PropertyNamedNodeExtensionType = NamedNodeBaseExtensionType<ts.PropertyName>;
|
2738 |
|
2739 | export declare type PropertyNamedNodeSpecific = NamedNodeSpecificBase<PropertyName>;
|
2740 |
|
2741 | export declare function ReferenceFindableNode<T extends Constructor<ReferenceFindableNodeExtensionType>>(Base: T): Constructor<ReferenceFindableNode> & T;
|
2742 |
|
2743 | export interface ReferenceFindableNode {
|
2744 | |
2745 |
|
2746 |
|
2747 | findReferences(): ReferencedSymbol[];
|
2748 | |
2749 |
|
2750 |
|
2751 | findReferencesAsNodes(): Node[];
|
2752 | }
|
2753 |
|
2754 | declare type ReferenceFindableNodeExtensionType = Node<ts.Node & {
|
2755 | name?: ts.PropertyName | ts.BindingName | ts.DeclarationName;
|
2756 | }>;
|
2757 |
|
2758 | export declare function RenameableNode<T extends Constructor<RenameableNodeExtensionType>>(Base: T): Constructor<RenameableNode> & T;
|
2759 |
|
2760 | export interface RenameableNode {
|
2761 | |
2762 |
|
2763 |
|
2764 |
|
2765 |
|
2766 | rename(newName: string, options?: RenameOptions): this;
|
2767 | }
|
2768 |
|
2769 | declare type RenameableNodeExtensionType = Node<ts.Node>;
|
2770 |
|
2771 | export declare function ParameteredNode<T extends Constructor<ParameteredNodeExtensionType>>(Base: T): Constructor<ParameteredNode> & T;
|
2772 |
|
2773 | export interface ParameteredNode {
|
2774 | |
2775 |
|
2776 |
|
2777 |
|
2778 | getParameter(name: string): ParameterDeclaration | undefined;
|
2779 | |
2780 |
|
2781 |
|
2782 |
|
2783 | getParameter(findFunction: (declaration: ParameterDeclaration) => boolean): ParameterDeclaration | undefined;
|
2784 | |
2785 |
|
2786 |
|
2787 |
|
2788 | getParameterOrThrow(name: string): ParameterDeclaration;
|
2789 | |
2790 |
|
2791 |
|
2792 |
|
2793 | getParameterOrThrow(findFunction: (declaration: ParameterDeclaration) => boolean): ParameterDeclaration;
|
2794 | |
2795 |
|
2796 |
|
2797 | getParameters(): ParameterDeclaration[];
|
2798 | |
2799 |
|
2800 |
|
2801 |
|
2802 | addParameter(structure: ParameterDeclarationStructure): ParameterDeclaration;
|
2803 | |
2804 |
|
2805 |
|
2806 |
|
2807 | addParameters(structures: ReadonlyArray<ParameterDeclarationStructure>): ParameterDeclaration[];
|
2808 | |
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 | insertParameters(index: number, structures: ReadonlyArray<ParameterDeclarationStructure>): ParameterDeclaration[];
|
2814 | |
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 | insertParameter(index: number, structure: ParameterDeclarationStructure): ParameterDeclaration;
|
2820 | }
|
2821 |
|
2822 | declare type ParameteredNodeExtensionType = Node<ts.Node & {
|
2823 | parameters: ts.NodeArray<ts.ParameterDeclaration>;
|
2824 | }>;
|
2825 |
|
2826 | export declare function QuestionTokenableNode<T extends Constructor<QuestionTokenableNodeExtensionType>>(Base: T): Constructor<QuestionTokenableNode> & T;
|
2827 |
|
2828 | export interface QuestionTokenableNode {
|
2829 | |
2830 |
|
2831 |
|
2832 | hasQuestionToken(): boolean;
|
2833 | |
2834 |
|
2835 |
|
2836 | getQuestionTokenNode(): Node<ts.QuestionToken> | undefined;
|
2837 | |
2838 |
|
2839 |
|
2840 | getQuestionTokenNodeOrThrow(): Node<ts.QuestionToken>;
|
2841 | |
2842 |
|
2843 |
|
2844 |
|
2845 | setHasQuestionToken(value: boolean): this;
|
2846 | }
|
2847 |
|
2848 | declare type QuestionTokenableNodeExtensionType = Node<ts.Node & {
|
2849 | questionToken?: ts.QuestionToken;
|
2850 | }>;
|
2851 |
|
2852 | export declare function ReadonlyableNode<T extends Constructor<ReadonlyableNodeExtensionType>>(Base: T): Constructor<ReadonlyableNode> & T;
|
2853 |
|
2854 | export interface ReadonlyableNode {
|
2855 | |
2856 |
|
2857 |
|
2858 | isReadonly(): boolean;
|
2859 | |
2860 |
|
2861 |
|
2862 | getReadonlyKeyword(): Node | undefined;
|
2863 | |
2864 |
|
2865 |
|
2866 | getReadonlyKeywordOrThrow(): Node;
|
2867 | |
2868 |
|
2869 |
|
2870 |
|
2871 | setIsReadonly(value: boolean): this;
|
2872 | }
|
2873 |
|
2874 | declare type ReadonlyableNodeExtensionType = Node & ModifierableNode;
|
2875 |
|
2876 | export declare function ReturnTypedNode<T extends Constructor<ReturnTypedNodeExtensionType>>(Base: T): Constructor<ReturnTypedNode> & T;
|
2877 |
|
2878 | export interface ReturnTypedNode {
|
2879 | |
2880 |
|
2881 |
|
2882 | getReturnType(): Type;
|
2883 | |
2884 |
|
2885 |
|
2886 | getReturnTypeNode(): TypeNode | undefined;
|
2887 | |
2888 |
|
2889 |
|
2890 | getReturnTypeNodeOrThrow(): TypeNode;
|
2891 | |
2892 |
|
2893 |
|
2894 |
|
2895 | setReturnType(textOrWriterFunction: string | WriterFunction): this;
|
2896 | |
2897 |
|
2898 |
|
2899 | removeReturnType(): this;
|
2900 | |
2901 |
|
2902 |
|
2903 | getSignature(): Signature;
|
2904 | }
|
2905 |
|
2906 | declare type ReturnTypedNodeExtensionType = Node<ts.SignatureDeclaration>;
|
2907 |
|
2908 | export declare function ScopeableNode<T extends Constructor<ScopeableNodeExtensionType>>(Base: T): Constructor<ScopeableNode> & T;
|
2909 |
|
2910 | export interface ScopeableNode {
|
2911 | |
2912 |
|
2913 |
|
2914 | getScope(): Scope | undefined;
|
2915 | |
2916 |
|
2917 |
|
2918 |
|
2919 | setScope(scope: Scope | undefined): this;
|
2920 | |
2921 |
|
2922 |
|
2923 | hasScopeKeyword(): boolean;
|
2924 | }
|
2925 |
|
2926 | declare type ScopeableNodeExtensionType = Node & ModifierableNode;
|
2927 |
|
2928 | export declare function ScopedNode<T extends Constructor<ScopedNodeExtensionType>>(Base: T): Constructor<ScopedNode> & T;
|
2929 |
|
2930 | export interface ScopedNode {
|
2931 | |
2932 |
|
2933 |
|
2934 | getScope(): Scope;
|
2935 | |
2936 |
|
2937 |
|
2938 |
|
2939 | setScope(scope: Scope | undefined): this;
|
2940 | |
2941 |
|
2942 |
|
2943 | hasScopeKeyword(): boolean;
|
2944 | }
|
2945 |
|
2946 | declare type ScopedNodeExtensionType = Node & ModifierableNode;
|
2947 |
|
2948 | export declare function SignaturedDeclaration<T extends Constructor<SignaturedDeclarationExtensionType>>(Base: T): Constructor<SignaturedDeclaration> & T;
|
2949 |
|
2950 | export interface SignaturedDeclaration extends ParameteredNode, ReturnTypedNode {
|
2951 | }
|
2952 |
|
2953 | declare type SignaturedDeclarationExtensionType = Node<ts.SignatureDeclaration>;
|
2954 |
|
2955 | export declare function StaticableNode<T extends Constructor<StaticableNodeExtensionType>>(Base: T): Constructor<StaticableNode> & T;
|
2956 |
|
2957 | export interface StaticableNode {
|
2958 | |
2959 |
|
2960 |
|
2961 | isStatic(): boolean;
|
2962 | |
2963 |
|
2964 |
|
2965 | getStaticKeyword(): Node | undefined;
|
2966 | |
2967 |
|
2968 |
|
2969 | getStaticKeywordOrThrow(): Node;
|
2970 | |
2971 |
|
2972 |
|
2973 |
|
2974 | setIsStatic(value: boolean): this;
|
2975 | }
|
2976 |
|
2977 | declare type StaticableNodeExtensionType = Node & ModifierableNode;
|
2978 |
|
2979 | export declare function TextInsertableNode<T extends Constructor<TextInsertableNodeExtensionType>>(Base: T): Constructor<TextInsertableNode> & T;
|
2980 |
|
2981 | export interface TextInsertableNode {
|
2982 | |
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 | insertText(pos: number, textOrWriterFunction: string | WriterFunction): this;
|
2990 | |
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 | replaceText(range: [number, number], textOrWriterFunction: string | WriterFunction): this;
|
2998 | |
2999 |
|
3000 |
|
3001 | removeText(): this;
|
3002 | |
3003 |
|
3004 |
|
3005 |
|
3006 |
|
3007 |
|
3008 |
|
3009 | removeText(pos: number, end: number): this;
|
3010 | }
|
3011 |
|
3012 | declare type TextInsertableNodeExtensionType = Node;
|
3013 |
|
3014 | export declare function TypeArgumentedNode<T extends Constructor<TypeArgumentedNodeExtensionType>>(Base: T): Constructor<TypeArgumentedNode> & T;
|
3015 |
|
3016 | export interface TypeArgumentedNode {
|
3017 | |
3018 |
|
3019 |
|
3020 | getTypeArguments(): TypeNode[];
|
3021 | |
3022 |
|
3023 |
|
3024 |
|
3025 | addTypeArgument(argumentText: string): TypeNode;
|
3026 | |
3027 |
|
3028 |
|
3029 |
|
3030 | addTypeArguments(argumentTexts: ReadonlyArray<string>): TypeNode[];
|
3031 | |
3032 |
|
3033 |
|
3034 |
|
3035 |
|
3036 | insertTypeArgument(index: number, argumentText: string): TypeNode;
|
3037 | |
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 | insertTypeArguments(index: number, argumentTexts: ReadonlyArray<string>): TypeNode[];
|
3043 | |
3044 |
|
3045 |
|
3046 |
|
3047 | removeTypeArgument(typeArg: Node): this;
|
3048 | |
3049 |
|
3050 |
|
3051 |
|
3052 | removeTypeArgument(index: number): this;
|
3053 | }
|
3054 |
|
3055 | declare type TypeArgumentedNodeExtensionType = Node<ts.Node & {
|
3056 | typeArguments?: ts.NodeArray<ts.TypeNode>;
|
3057 | }>;
|
3058 |
|
3059 | export declare function TypedNode<T extends Constructor<TypedNodeExtensionType>>(Base: T): Constructor<TypedNode> & T;
|
3060 |
|
3061 | export interface TypedNode {
|
3062 | |
3063 |
|
3064 |
|
3065 | getTypeNode(): TypeNode | undefined;
|
3066 | |
3067 |
|
3068 |
|
3069 | getTypeNodeOrThrow(): TypeNode;
|
3070 | |
3071 |
|
3072 |
|
3073 |
|
3074 | setType(textOrWriterFunction: string | WriterFunction): this;
|
3075 | |
3076 |
|
3077 |
|
3078 | removeType(): this;
|
3079 | }
|
3080 |
|
3081 | declare type TypedNodeExtensionType = Node<ts.Node & {
|
3082 | type?: ts.TypeNode;
|
3083 | }>;
|
3084 |
|
3085 | export declare function TypeElementMemberedNode<T extends Constructor<TypeElementMemberedNodeExtensionType>>(Base: T): Constructor<TypeElementMemberedNode> & T;
|
3086 |
|
3087 | export interface TypeElementMemberedNode {
|
3088 | |
3089 |
|
3090 |
|
3091 |
|
3092 | addConstructSignature(structure: ConstructSignatureDeclarationStructure): ConstructSignatureDeclaration;
|
3093 | |
3094 |
|
3095 |
|
3096 |
|
3097 | addConstructSignatures(structures: ReadonlyArray<ConstructSignatureDeclarationStructure>): ConstructSignatureDeclaration[];
|
3098 | |
3099 |
|
3100 |
|
3101 |
|
3102 |
|
3103 | insertConstructSignature(index: number, structure: ConstructSignatureDeclarationStructure): ConstructSignatureDeclaration;
|
3104 | |
3105 |
|
3106 |
|
3107 |
|
3108 |
|
3109 | insertConstructSignatures(index: number, structures: ReadonlyArray<ConstructSignatureDeclarationStructure>): ConstructSignatureDeclaration[];
|
3110 | |
3111 |
|
3112 |
|
3113 |
|
3114 | getConstructSignature(findFunction: (member: ConstructSignatureDeclaration) => boolean): ConstructSignatureDeclaration | undefined;
|
3115 | |
3116 |
|
3117 |
|
3118 |
|
3119 | getConstructSignatureOrThrow(findFunction: (member: ConstructSignatureDeclaration) => boolean): ConstructSignatureDeclaration;
|
3120 | |
3121 |
|
3122 |
|
3123 | getConstructSignatures(): ConstructSignatureDeclaration[];
|
3124 | |
3125 |
|
3126 |
|
3127 |
|
3128 | addCallSignature(structure: CallSignatureDeclarationStructure): CallSignatureDeclaration;
|
3129 | |
3130 |
|
3131 |
|
3132 |
|
3133 | addCallSignatures(structures: ReadonlyArray<CallSignatureDeclarationStructure>): CallSignatureDeclaration[];
|
3134 | |
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 | insertCallSignature(index: number, structure: CallSignatureDeclarationStructure): CallSignatureDeclaration;
|
3140 | |
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 | insertCallSignatures(index: number, structures: ReadonlyArray<CallSignatureDeclarationStructure>): CallSignatureDeclaration[];
|
3146 | |
3147 |
|
3148 |
|
3149 |
|
3150 | getCallSignature(findFunction: (member: CallSignatureDeclaration) => boolean): CallSignatureDeclaration | undefined;
|
3151 | |
3152 |
|
3153 |
|
3154 |
|
3155 | getCallSignatureOrThrow(findFunction: (member: CallSignatureDeclaration) => boolean): CallSignatureDeclaration;
|
3156 | |
3157 |
|
3158 |
|
3159 | getCallSignatures(): CallSignatureDeclaration[];
|
3160 | |
3161 |
|
3162 |
|
3163 |
|
3164 | addIndexSignature(structure: IndexSignatureDeclarationStructure): IndexSignatureDeclaration;
|
3165 | |
3166 |
|
3167 |
|
3168 |
|
3169 | addIndexSignatures(structures: ReadonlyArray<IndexSignatureDeclarationStructure>): IndexSignatureDeclaration[];
|
3170 | |
3171 |
|
3172 |
|
3173 |
|
3174 |
|
3175 | insertIndexSignature(index: number, structure: IndexSignatureDeclarationStructure): IndexSignatureDeclaration;
|
3176 | |
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 | insertIndexSignatures(index: number, structures: ReadonlyArray<IndexSignatureDeclarationStructure>): IndexSignatureDeclaration[];
|
3182 | |
3183 |
|
3184 |
|
3185 |
|
3186 | getIndexSignature(findFunction: (member: IndexSignatureDeclaration) => boolean): IndexSignatureDeclaration | undefined;
|
3187 | |
3188 |
|
3189 |
|
3190 |
|
3191 | getIndexSignatureOrThrow(findFunction: (member: IndexSignatureDeclaration) => boolean): IndexSignatureDeclaration;
|
3192 | |
3193 |
|
3194 |
|
3195 | getIndexSignatures(): IndexSignatureDeclaration[];
|
3196 | |
3197 |
|
3198 |
|
3199 |
|
3200 | addMethod(structure: MethodSignatureStructure): MethodSignature;
|
3201 | |
3202 |
|
3203 |
|
3204 |
|
3205 | addMethods(structures: ReadonlyArray<MethodSignatureStructure>): MethodSignature[];
|
3206 | |
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 | insertMethod(index: number, structure: MethodSignatureStructure): MethodSignature;
|
3212 | |
3213 |
|
3214 |
|
3215 |
|
3216 |
|
3217 | insertMethods(index: number, structures: ReadonlyArray<MethodSignatureStructure>): MethodSignature[];
|
3218 | |
3219 |
|
3220 |
|
3221 |
|
3222 | getMethod(name: string): MethodSignature | undefined;
|
3223 | |
3224 |
|
3225 |
|
3226 |
|
3227 | getMethod(findFunction: (member: MethodSignature) => boolean): MethodSignature | undefined;
|
3228 | |
3229 |
|
3230 |
|
3231 |
|
3232 | getMethodOrThrow(name: string): MethodSignature;
|
3233 | |
3234 |
|
3235 |
|
3236 |
|
3237 | getMethodOrThrow(findFunction: (member: MethodSignature) => boolean): MethodSignature;
|
3238 | |
3239 |
|
3240 |
|
3241 | getMethods(): MethodSignature[];
|
3242 | |
3243 |
|
3244 |
|
3245 |
|
3246 | addProperty(structure: PropertySignatureStructure): PropertySignature;
|
3247 | |
3248 |
|
3249 |
|
3250 |
|
3251 | addProperties(structures: ReadonlyArray<PropertySignatureStructure>): PropertySignature[];
|
3252 | |
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 | insertProperty(index: number, structure: PropertySignatureStructure): PropertySignature;
|
3258 | |
3259 |
|
3260 |
|
3261 |
|
3262 |
|
3263 | insertProperties(index: number, structures: ReadonlyArray<PropertySignatureStructure>): PropertySignature[];
|
3264 | |
3265 |
|
3266 |
|
3267 |
|
3268 | getProperty(name: string): PropertySignature | undefined;
|
3269 | |
3270 |
|
3271 |
|
3272 |
|
3273 | getProperty(findFunction: (member: PropertySignature) => boolean): PropertySignature | undefined;
|
3274 | |
3275 |
|
3276 |
|
3277 |
|
3278 | getPropertyOrThrow(name: string): PropertySignature;
|
3279 | |
3280 |
|
3281 |
|
3282 |
|
3283 | getPropertyOrThrow(findFunction: (member: PropertySignature) => boolean): PropertySignature;
|
3284 | |
3285 |
|
3286 |
|
3287 | getProperties(): PropertySignature[];
|
3288 | |
3289 |
|
3290 |
|
3291 | getMembers(): TypeElementTypes[];
|
3292 | }
|
3293 |
|
3294 | declare type TypeElementMemberedNodeExtensionType = Node<ts.Node & {
|
3295 | members: ts.TypeElement[];
|
3296 | }>;
|
3297 |
|
3298 | export declare function TypeParameteredNode<T extends Constructor<TypeParameteredNodeExtensionType>>(Base: T): Constructor<TypeParameteredNode> & T;
|
3299 |
|
3300 | export interface TypeParameteredNode {
|
3301 | |
3302 |
|
3303 |
|
3304 |
|
3305 | getTypeParameter(name: string): TypeParameterDeclaration | undefined;
|
3306 | |
3307 |
|
3308 |
|
3309 |
|
3310 | getTypeParameter(findFunction: (declaration: TypeParameterDeclaration) => boolean): TypeParameterDeclaration | undefined;
|
3311 | |
3312 |
|
3313 |
|
3314 |
|
3315 | getTypeParameterOrThrow(name: string): TypeParameterDeclaration;
|
3316 | |
3317 |
|
3318 |
|
3319 |
|
3320 | getTypeParameterOrThrow(findFunction: (declaration: TypeParameterDeclaration) => boolean): TypeParameterDeclaration;
|
3321 | |
3322 |
|
3323 |
|
3324 | getTypeParameters(): TypeParameterDeclaration[];
|
3325 | |
3326 |
|
3327 |
|
3328 |
|
3329 | addTypeParameter(structure: TypeParameterDeclarationStructure | string): TypeParameterDeclaration;
|
3330 | |
3331 |
|
3332 |
|
3333 |
|
3334 | addTypeParameters(structures: ReadonlyArray<TypeParameterDeclarationStructure | string>): TypeParameterDeclaration[];
|
3335 | |
3336 |
|
3337 |
|
3338 |
|
3339 |
|
3340 | insertTypeParameter(index: number, structure: TypeParameterDeclarationStructure | string): TypeParameterDeclaration;
|
3341 | |
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 | insertTypeParameters(index: number, structures: ReadonlyArray<TypeParameterDeclarationStructure | string>): TypeParameterDeclaration[];
|
3347 | }
|
3348 |
|
3349 | declare type TypeParameteredNodeExtensionType = Node<ts.Node & {
|
3350 | typeParameters?: ts.NodeArray<ts.TypeParameterDeclaration>;
|
3351 | }>;
|
3352 |
|
3353 | export declare function UnwrappableNode<T extends Constructor<UnwrappableNodeExtensionType>>(Base: T): Constructor<UnwrappableNode> & T;
|
3354 |
|
3355 | export interface UnwrappableNode {
|
3356 | |
3357 |
|
3358 |
|
3359 | unwrap(): void;
|
3360 | }
|
3361 |
|
3362 | declare type UnwrappableNodeExtensionType = Node;
|
3363 |
|
3364 | export declare class ArrayBindingPattern extends Node<ts.ArrayBindingPattern> {
|
3365 | |
3366 |
|
3367 |
|
3368 | getElements(): (BindingElement | OmittedExpression)[];
|
3369 | }
|
3370 |
|
3371 | declare const BindingElementBase: Constructor<InitializerExpressionableNode> & Constructor<BindingNamedNode> & typeof Node;
|
3372 |
|
3373 | export declare class BindingElement extends BindingElementBase<ts.BindingElement> {
|
3374 | |
3375 |
|
3376 |
|
3377 | getDotDotDotTokenOrThrow(): Node<ts.Token<SyntaxKind.DotDotDotToken>>;
|
3378 | |
3379 |
|
3380 |
|
3381 | getDotDotDotToken(): Node<ts.Token<SyntaxKind.DotDotDotToken>> | undefined;
|
3382 | |
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 | getPropertyNameNodeOrThrow(): PropertyName;
|
3388 | |
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 | getPropertyNameNode(): Identifier | NumericLiteral | StringLiteral | ComputedPropertyName | undefined;
|
3394 | }
|
3395 |
|
3396 | export declare class ObjectBindingPattern extends Node<ts.ObjectBindingPattern> {
|
3397 | |
3398 |
|
3399 |
|
3400 | getElements(): BindingElement[];
|
3401 | }
|
3402 |
|
3403 | export declare function AbstractableNode<T extends Constructor<AbstractableNodeExtensionType>>(Base: T): Constructor<AbstractableNode> & T;
|
3404 |
|
3405 | export interface AbstractableNode {
|
3406 | |
3407 |
|
3408 |
|
3409 | isAbstract(): boolean;
|
3410 | |
3411 |
|
3412 |
|
3413 | getAbstractKeyword(): Node | undefined;
|
3414 | |
3415 |
|
3416 |
|
3417 | getAbstractKeywordOrThrow(): Node;
|
3418 | |
3419 |
|
3420 |
|
3421 |
|
3422 | setIsAbstract(isAbstract: boolean): this;
|
3423 | }
|
3424 |
|
3425 | declare type AbstractableNodeExtensionType = Node & ModifierableNode;
|
3426 |
|
3427 | export declare function ClassLikeDeclarationBase<T extends Constructor<ClassLikeDeclarationBaseExtensionType>>(Base: T): Constructor<ClassLikeDeclarationBase> & T;
|
3428 |
|
3429 | export interface ClassLikeDeclarationBase extends NameableNode, TextInsertableNode, ImplementsClauseableNode, HeritageClauseableNode, AbstractableNode, JSDocableNode, TypeParameteredNode, DecoratableNode, ModifierableNode, ClassLikeDeclarationBaseSpecific {
|
3430 | }
|
3431 |
|
3432 | declare function ClassLikeDeclarationBaseSpecific<T extends Constructor<ClassLikeDeclarationBaseSpecificExtensionType>>(Base: T): Constructor<ClassLikeDeclarationBaseSpecific> & T;
|
3433 |
|
3434 | interface ClassLikeDeclarationBaseSpecific {
|
3435 | |
3436 |
|
3437 |
|
3438 |
|
3439 | setExtends(text: string | WriterFunction): this;
|
3440 | |
3441 |
|
3442 |
|
3443 | removeExtends(): this;
|
3444 | |
3445 |
|
3446 |
|
3447 | getExtendsOrThrow(): ExpressionWithTypeArguments;
|
3448 | |
3449 |
|
3450 |
|
3451 | getExtends(): ExpressionWithTypeArguments | undefined;
|
3452 | |
3453 |
|
3454 |
|
3455 |
|
3456 | addConstructor(structure?: ConstructorDeclarationStructure): ConstructorDeclaration;
|
3457 | |
3458 |
|
3459 |
|
3460 |
|
3461 | addConstructors(structures: ReadonlyArray<ConstructorDeclarationStructure>): ConstructorDeclaration[];
|
3462 | |
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 | insertConstructor(index: number, structure?: ConstructorDeclarationStructure): ConstructorDeclaration;
|
3468 | |
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 | insertConstructors(index: number, structures: ReadonlyArray<ConstructorDeclarationStructure>): ConstructorDeclaration[];
|
3474 | |
3475 |
|
3476 |
|
3477 | getConstructors(): ConstructorDeclaration[];
|
3478 | |
3479 |
|
3480 |
|
3481 |
|
3482 | addGetAccessor(structure: GetAccessorDeclarationStructure): GetAccessorDeclaration;
|
3483 | |
3484 |
|
3485 |
|
3486 |
|
3487 | addGetAccessors(structures: ReadonlyArray<GetAccessorDeclarationStructure>): GetAccessorDeclaration[];
|
3488 | |
3489 |
|
3490 |
|
3491 |
|
3492 |
|
3493 | insertGetAccessor(index: number, structure: GetAccessorDeclarationStructure): GetAccessorDeclaration;
|
3494 | |
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 | insertGetAccessors(index: number, structures: ReadonlyArray<GetAccessorDeclarationStructure>): GetAccessorDeclaration[];
|
3500 | |
3501 |
|
3502 |
|
3503 |
|
3504 | addSetAccessor(structure: SetAccessorDeclarationStructure): SetAccessorDeclaration;
|
3505 | |
3506 |
|
3507 |
|
3508 |
|
3509 | addSetAccessors(structures: ReadonlyArray<SetAccessorDeclarationStructure>): SetAccessorDeclaration[];
|
3510 | |
3511 |
|
3512 |
|
3513 |
|
3514 |
|
3515 | insertSetAccessor(index: number, structure: SetAccessorDeclarationStructure): SetAccessorDeclaration;
|
3516 | |
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 | insertSetAccessors(index: number, structures: ReadonlyArray<SetAccessorDeclarationStructure>): SetAccessorDeclaration[];
|
3522 | |
3523 |
|
3524 |
|
3525 |
|
3526 | addProperty(structure: PropertyDeclarationStructure): PropertyDeclaration;
|
3527 | |
3528 |
|
3529 |
|
3530 |
|
3531 | addProperties(structures: ReadonlyArray<PropertyDeclarationStructure>): PropertyDeclaration[];
|
3532 | |
3533 |
|
3534 |
|
3535 |
|
3536 |
|
3537 | insertProperty(index: number, structure: PropertyDeclarationStructure): PropertyDeclaration;
|
3538 | |
3539 |
|
3540 |
|
3541 |
|
3542 |
|
3543 | insertProperties(index: number, structures: ReadonlyArray<PropertyDeclarationStructure>): PropertyDeclaration[];
|
3544 | |
3545 |
|
3546 |
|
3547 |
|
3548 | getInstanceProperty(name: string): ClassInstancePropertyTypes | undefined;
|
3549 | |
3550 |
|
3551 |
|
3552 |
|
3553 | getInstanceProperty(findFunction: (prop: ClassInstancePropertyTypes) => boolean): ClassInstancePropertyTypes | undefined;
|
3554 | |
3555 |
|
3556 |
|
3557 |
|
3558 | getInstancePropertyOrThrow(name: string): ClassInstancePropertyTypes;
|
3559 | |
3560 |
|
3561 |
|
3562 |
|
3563 | getInstancePropertyOrThrow(findFunction: (prop: ClassInstancePropertyTypes) => boolean): ClassInstancePropertyTypes;
|
3564 | |
3565 |
|
3566 |
|
3567 | getInstanceProperties(): ClassInstancePropertyTypes[];
|
3568 | |
3569 |
|
3570 |
|
3571 |
|
3572 | getStaticProperty(name: string): ClassStaticPropertyTypes | undefined;
|
3573 | |
3574 |
|
3575 |
|
3576 |
|
3577 | getStaticProperty(findFunction: (prop: ClassStaticPropertyTypes) => boolean): ClassStaticPropertyTypes | undefined;
|
3578 | |
3579 |
|
3580 |
|
3581 |
|
3582 | getStaticPropertyOrThrow(name: string): ClassStaticPropertyTypes;
|
3583 | |
3584 |
|
3585 |
|
3586 |
|
3587 | getStaticPropertyOrThrow(findFunction: (prop: ClassStaticPropertyTypes) => boolean): ClassStaticPropertyTypes;
|
3588 | |
3589 |
|
3590 |
|
3591 | getStaticProperties(): ClassStaticPropertyTypes[];
|
3592 | |
3593 |
|
3594 |
|
3595 |
|
3596 | getProperty(name: string): PropertyDeclaration | undefined;
|
3597 | |
3598 |
|
3599 |
|
3600 |
|
3601 | getProperty(findFunction: (property: PropertyDeclaration) => boolean): PropertyDeclaration | undefined;
|
3602 | |
3603 |
|
3604 |
|
3605 |
|
3606 | getPropertyOrThrow(name: string): PropertyDeclaration;
|
3607 | |
3608 |
|
3609 |
|
3610 |
|
3611 | getPropertyOrThrow(findFunction: (property: PropertyDeclaration) => boolean): PropertyDeclaration;
|
3612 | |
3613 |
|
3614 |
|
3615 | getProperties(): PropertyDeclaration[];
|
3616 | |
3617 |
|
3618 |
|
3619 |
|
3620 | getGetAccessor(name: string): GetAccessorDeclaration | undefined;
|
3621 | |
3622 |
|
3623 |
|
3624 |
|
3625 | getGetAccessor(findFunction: (getAccessor: GetAccessorDeclaration) => boolean): GetAccessorDeclaration | undefined;
|
3626 | |
3627 |
|
3628 |
|
3629 |
|
3630 | getGetAccessorOrThrow(name: string): GetAccessorDeclaration;
|
3631 | |
3632 |
|
3633 |
|
3634 |
|
3635 | getGetAccessorOrThrow(findFunction: (getAccessor: GetAccessorDeclaration) => boolean): GetAccessorDeclaration;
|
3636 | |
3637 |
|
3638 |
|
3639 | getGetAccessors(): GetAccessorDeclaration[];
|
3640 | |
3641 |
|
3642 |
|
3643 |
|
3644 | getSetAccessor(name: string): SetAccessorDeclaration | undefined;
|
3645 | |
3646 |
|
3647 |
|
3648 |
|
3649 | getSetAccessor(findFunction: (setAccessor: SetAccessorDeclaration) => boolean): SetAccessorDeclaration | undefined;
|
3650 | |
3651 |
|
3652 |
|
3653 |
|
3654 | getSetAccessorOrThrow(name: string): SetAccessorDeclaration;
|
3655 | |
3656 |
|
3657 |
|
3658 |
|
3659 | getSetAccessorOrThrow(findFunction: (setAccessor: SetAccessorDeclaration) => boolean): SetAccessorDeclaration;
|
3660 | |
3661 |
|
3662 |
|
3663 | getSetAccessors(): SetAccessorDeclaration[];
|
3664 | |
3665 |
|
3666 |
|
3667 |
|
3668 | addMethod(structure: MethodDeclarationStructure): MethodDeclaration;
|
3669 | |
3670 |
|
3671 |
|
3672 |
|
3673 | addMethods(structures: ReadonlyArray<MethodDeclarationStructure>): MethodDeclaration[];
|
3674 | |
3675 |
|
3676 |
|
3677 |
|
3678 |
|
3679 | insertMethod(index: number, structure: MethodDeclarationStructure): MethodDeclaration;
|
3680 | |
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 | insertMethods(index: number, structures: ReadonlyArray<MethodDeclarationStructure>): MethodDeclaration[];
|
3686 | |
3687 |
|
3688 |
|
3689 |
|
3690 | getMethod(name: string): MethodDeclaration | undefined;
|
3691 | |
3692 |
|
3693 |
|
3694 |
|
3695 | getMethod(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration | undefined;
|
3696 | |
3697 |
|
3698 |
|
3699 |
|
3700 | getMethodOrThrow(name: string): MethodDeclaration;
|
3701 | |
3702 |
|
3703 |
|
3704 |
|
3705 | getMethodOrThrow(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration;
|
3706 | |
3707 |
|
3708 |
|
3709 | getMethods(): MethodDeclaration[];
|
3710 | |
3711 |
|
3712 |
|
3713 |
|
3714 | getInstanceMethod(name: string): MethodDeclaration | undefined;
|
3715 | |
3716 |
|
3717 |
|
3718 |
|
3719 | getInstanceMethod(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration | undefined;
|
3720 | |
3721 |
|
3722 |
|
3723 |
|
3724 | getInstanceMethodOrThrow(name: string): MethodDeclaration;
|
3725 | |
3726 |
|
3727 |
|
3728 |
|
3729 | getInstanceMethodOrThrow(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration;
|
3730 | |
3731 |
|
3732 |
|
3733 | getInstanceMethods(): MethodDeclaration[];
|
3734 | |
3735 |
|
3736 |
|
3737 |
|
3738 | getStaticMethod(name: string): MethodDeclaration | undefined;
|
3739 | |
3740 |
|
3741 |
|
3742 |
|
3743 | getStaticMethod(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration | undefined;
|
3744 | |
3745 |
|
3746 |
|
3747 |
|
3748 | getStaticMethodOrThrow(name: string): MethodDeclaration;
|
3749 | |
3750 |
|
3751 |
|
3752 |
|
3753 | getStaticMethodOrThrow(findFunction: (method: MethodDeclaration) => boolean): MethodDeclaration;
|
3754 | |
3755 |
|
3756 |
|
3757 | getStaticMethods(): MethodDeclaration[];
|
3758 | |
3759 |
|
3760 |
|
3761 |
|
3762 | getInstanceMember(name: string): ClassInstanceMemberTypes | undefined;
|
3763 | |
3764 |
|
3765 |
|
3766 |
|
3767 | getInstanceMember(findFunction: (member: ClassInstanceMemberTypes) => boolean): ClassInstanceMemberTypes | undefined;
|
3768 | |
3769 |
|
3770 |
|
3771 |
|
3772 | getInstanceMemberOrThrow(name: string): ClassInstanceMemberTypes;
|
3773 | |
3774 |
|
3775 |
|
3776 |
|
3777 | getInstanceMemberOrThrow(findFunction: (member: ClassInstanceMemberTypes) => boolean): ClassInstanceMemberTypes;
|
3778 | |
3779 |
|
3780 |
|
3781 | getInstanceMembers(): ClassInstanceMemberTypes[];
|
3782 | |
3783 |
|
3784 |
|
3785 |
|
3786 | getStaticMember(name: string): ClassStaticMemberTypes | undefined;
|
3787 | |
3788 |
|
3789 |
|
3790 |
|
3791 | getStaticMember(findFunction: (member: ClassStaticMemberTypes) => boolean): ClassStaticMemberTypes | undefined;
|
3792 | |
3793 |
|
3794 |
|
3795 |
|
3796 | getStaticMemberOrThrow(name: string): ClassStaticMemberTypes;
|
3797 | |
3798 |
|
3799 |
|
3800 |
|
3801 | getStaticMemberOrThrow(findFunction: (member: ClassStaticMemberTypes) => boolean): ClassStaticMemberTypes;
|
3802 | |
3803 |
|
3804 |
|
3805 | getStaticMembers(): ClassStaticMemberTypes[];
|
3806 | |
3807 |
|
3808 |
|
3809 | getMembers(): ClassMemberTypes[];
|
3810 | |
3811 |
|
3812 |
|
3813 |
|
3814 | getMember(name: string): ClassMemberTypes | undefined;
|
3815 | |
3816 |
|
3817 |
|
3818 |
|
3819 | getMember(findFunction: (member: ClassMemberTypes) => boolean): ClassMemberTypes | undefined;
|
3820 | |
3821 |
|
3822 |
|
3823 |
|
3824 | getMemberOrThrow(name: string): ClassMemberTypes;
|
3825 | |
3826 |
|
3827 |
|
3828 |
|
3829 | getMemberOrThrow(findFunction: (member: ClassMemberTypes) => boolean): ClassMemberTypes;
|
3830 | |
3831 |
|
3832 |
|
3833 |
|
3834 |
|
3835 | getBaseTypes(): Type[];
|
3836 | |
3837 |
|
3838 |
|
3839 |
|
3840 |
|
3841 | getBaseClassOrThrow(): ClassDeclaration;
|
3842 | |
3843 |
|
3844 |
|
3845 |
|
3846 |
|
3847 | getBaseClass(): ClassDeclaration | undefined;
|
3848 | |
3849 |
|
3850 |
|
3851 | getDerivedClasses(): ClassDeclaration[];
|
3852 | }
|
3853 |
|
3854 | export declare type ClassPropertyTypes = PropertyDeclaration | GetAccessorDeclaration | SetAccessorDeclaration;
|
3855 |
|
3856 | export declare type ClassInstancePropertyTypes = ClassPropertyTypes | ParameterDeclaration;
|
3857 |
|
3858 | export declare type ClassInstanceMemberTypes = MethodDeclaration | ClassInstancePropertyTypes;
|
3859 |
|
3860 | export declare type ClassStaticPropertyTypes = PropertyDeclaration | GetAccessorDeclaration | SetAccessorDeclaration;
|
3861 |
|
3862 | export declare type ClassStaticMemberTypes = MethodDeclaration | ClassStaticPropertyTypes;
|
3863 |
|
3864 | export declare type ClassMemberTypes = MethodDeclaration | PropertyDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration;
|
3865 |
|
3866 | declare type ClassLikeDeclarationBaseExtensionType = Node<ts.ClassLikeDeclarationBase>;
|
3867 |
|
3868 | declare type ClassLikeDeclarationBaseSpecificExtensionType = Node<ts.ClassLikeDeclarationBase> & HeritageClauseableNode & ModifierableNode & NameableNode;
|
3869 |
|
3870 | declare const ClassDeclarationBase: Constructor<ChildOrderableNode> & Constructor<NamespaceChildableNode> & Constructor<AmbientableNode> & Constructor<ExportableNode> & Constructor<ClassLikeDeclarationBase> & typeof Statement;
|
3871 |
|
3872 | export declare class ClassDeclaration extends ClassDeclarationBase<ts.ClassDeclaration> {
|
3873 | |
3874 |
|
3875 |
|
3876 |
|
3877 | set(structure: Partial<ClassDeclarationStructure>): this;
|
3878 | |
3879 |
|
3880 |
|
3881 | getStructure(): ClassDeclarationStructure;
|
3882 | |
3883 |
|
3884 |
|
3885 |
|
3886 | extractInterface(name?: string): InterfaceDeclarationStructure;
|
3887 | |
3888 |
|
3889 |
|
3890 |
|
3891 | extractStaticInterface(name: string): InterfaceDeclarationStructure;
|
3892 | }
|
3893 |
|
3894 | declare const ClassExpressionBase: Constructor<ClassLikeDeclarationBase> & typeof PrimaryExpression;
|
3895 |
|
3896 | export declare class ClassExpression extends ClassExpressionBase<ts.ClassExpression> {
|
3897 | }
|
3898 |
|
3899 | declare const ConstructorDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<OverloadableNode> & Constructor<ScopedNode> & Constructor<FunctionLikeDeclaration> & Constructor<BodyableNode> & typeof Node;
|
3900 |
|
3901 | declare const ConstructorDeclarationOverloadBase: Constructor<TypeParameteredNode> & Constructor<JSDocableNode> & Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<ScopedNode> & Constructor<ModifierableNode> & Constructor<SignaturedDeclaration> & typeof Node;
|
3902 |
|
3903 | export declare class ConstructorDeclaration extends ConstructorDeclarationBase<ts.ConstructorDeclaration> {
|
3904 | |
3905 |
|
3906 |
|
3907 |
|
3908 | set(structure: Partial<ConstructorDeclarationStructure>): this;
|
3909 | |
3910 |
|
3911 |
|
3912 |
|
3913 | addOverload(structure: ConstructorDeclarationOverloadStructure): ConstructorDeclaration;
|
3914 | |
3915 |
|
3916 |
|
3917 |
|
3918 | addOverloads(structures: ReadonlyArray<ConstructorDeclarationOverloadStructure>): ConstructorDeclaration[];
|
3919 | |
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 | insertOverload(index: number, structure: ConstructorDeclarationOverloadStructure): ConstructorDeclaration;
|
3925 | |
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 | insertOverloads(index: number, structures: ReadonlyArray<ConstructorDeclarationOverloadStructure>): ConstructorDeclaration[];
|
3931 | |
3932 |
|
3933 |
|
3934 | remove(): void;
|
3935 | |
3936 |
|
3937 |
|
3938 | getStructure(): ConstructorDeclarationStructure | ConstructorDeclarationOverloadStructure;
|
3939 | }
|
3940 |
|
3941 | declare const GetAccessorDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<DecoratableNode> & Constructor<AbstractableNode> & Constructor<ScopedNode> & Constructor<StaticableNode> & Constructor<FunctionLikeDeclaration> & Constructor<BodyableNode> & Constructor<PropertyNamedNode> & typeof Node;
|
3942 |
|
3943 | export declare class GetAccessorDeclaration extends GetAccessorDeclarationBase<ts.GetAccessorDeclaration> {
|
3944 | |
3945 |
|
3946 |
|
3947 |
|
3948 | set(structure: Partial<GetAccessorDeclarationStructure>): this;
|
3949 | |
3950 |
|
3951 |
|
3952 | getSetAccessor(): SetAccessorDeclaration | undefined;
|
3953 | |
3954 |
|
3955 |
|
3956 | getSetAccessorOrThrow(): SetAccessorDeclaration;
|
3957 | |
3958 |
|
3959 |
|
3960 | remove(): void;
|
3961 | |
3962 |
|
3963 |
|
3964 | getStructure(): GetAccessorDeclarationStructure;
|
3965 | }
|
3966 |
|
3967 | declare const MethodDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<OverloadableNode> & Constructor<BodyableNode> & Constructor<DecoratableNode> & Constructor<AbstractableNode> & Constructor<ScopedNode> & Constructor<QuestionTokenableNode> & Constructor<StaticableNode> & Constructor<AsyncableNode> & Constructor<GeneratorableNode> & Constructor<FunctionLikeDeclaration> & Constructor<PropertyNamedNode> & typeof Node;
|
3968 |
|
3969 | declare const MethodDeclarationOverloadBase: Constructor<JSDocableNode> & Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<ScopedNode> & Constructor<TypeParameteredNode> & Constructor<AbstractableNode> & Constructor<QuestionTokenableNode> & Constructor<StaticableNode> & Constructor<AsyncableNode> & Constructor<ModifierableNode> & Constructor<GeneratorableNode> & Constructor<SignaturedDeclaration> & typeof Node;
|
3970 |
|
3971 | export declare class MethodDeclaration extends MethodDeclarationBase<ts.MethodDeclaration> {
|
3972 | |
3973 |
|
3974 |
|
3975 |
|
3976 | set(structure: Partial<MethodDeclarationStructure>): this;
|
3977 | |
3978 |
|
3979 |
|
3980 |
|
3981 | addOverload(structure: MethodDeclarationOverloadStructure): MethodDeclaration;
|
3982 | |
3983 |
|
3984 |
|
3985 |
|
3986 | addOverloads(structures: ReadonlyArray<MethodDeclarationOverloadStructure>): MethodDeclaration[];
|
3987 | |
3988 |
|
3989 |
|
3990 |
|
3991 |
|
3992 | insertOverload(index: number, structure: MethodDeclarationOverloadStructure): MethodDeclaration;
|
3993 | |
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 | insertOverloads(index: number, structures: ReadonlyArray<MethodDeclarationOverloadStructure>): MethodDeclaration[];
|
3999 | |
4000 |
|
4001 |
|
4002 | remove(): void;
|
4003 | |
4004 |
|
4005 |
|
4006 | getStructure(): MethodDeclarationStructure | MethodDeclarationOverloadStructure;
|
4007 | }
|
4008 |
|
4009 | declare const PropertyDeclarationBase: Constructor<ChildOrderableNode> & Constructor<DecoratableNode> & Constructor<AbstractableNode> & Constructor<ScopedNode> & Constructor<StaticableNode> & Constructor<JSDocableNode> & Constructor<ReadonlyableNode> & Constructor<ExclamationTokenableNode> & Constructor<QuestionTokenableNode> & Constructor<InitializerExpressionableNode> & Constructor<TypedNode> & Constructor<PropertyNamedNode> & Constructor<ModifierableNode> & typeof Node;
|
4010 |
|
4011 | export declare class PropertyDeclaration extends PropertyDeclarationBase<ts.PropertyDeclaration> {
|
4012 | |
4013 |
|
4014 |
|
4015 |
|
4016 | set(structure: Partial<PropertyDeclarationStructure>): this;
|
4017 | |
4018 |
|
4019 |
|
4020 | remove(): void;
|
4021 | |
4022 |
|
4023 |
|
4024 | getStructure(): PropertyDeclarationStructure;
|
4025 | }
|
4026 |
|
4027 | declare const SetAccessorDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<DecoratableNode> & Constructor<AbstractableNode> & Constructor<ScopedNode> & Constructor<StaticableNode> & Constructor<FunctionLikeDeclaration> & Constructor<BodyableNode> & Constructor<PropertyNamedNode> & typeof Node;
|
4028 |
|
4029 | export declare class SetAccessorDeclaration extends SetAccessorDeclarationBase<ts.SetAccessorDeclaration> {
|
4030 | |
4031 |
|
4032 |
|
4033 |
|
4034 | set(structure: Partial<SetAccessorDeclarationStructure>): this;
|
4035 | |
4036 |
|
4037 |
|
4038 | getGetAccessor(): GetAccessorDeclaration | undefined;
|
4039 | |
4040 |
|
4041 |
|
4042 | getGetAccessorOrThrow(): GetAccessorDeclaration;
|
4043 | |
4044 |
|
4045 |
|
4046 | remove(): void;
|
4047 | |
4048 |
|
4049 |
|
4050 | getStructure(): SetAccessorDeclarationStructure;
|
4051 | }
|
4052 |
|
4053 | export declare class CommentRange {
|
4054 | private constructor();
|
4055 | /**
|
4056 | * Gets the underlying compiler object.
|
4057 | */
|
4058 | readonly compilerObject: ts.CommentRange;
|
4059 | /**
|
4060 | * Gets the source file of the comment range.
|
4061 | */
|
4062 | getSourceFile(): SourceFile;
|
4063 | /**
|
4064 | * Gets the comment syntax kind.
|
4065 | */
|
4066 | getKind(): ts.CommentKind;
|
4067 | /**
|
4068 | * Gets the position.
|
4069 | */
|
4070 | getPos(): number;
|
4071 | /**
|
4072 | * Gets the end.
|
4073 | */
|
4074 | getEnd(): number;
|
4075 | /**
|
4076 | * Gets the width of the comment range.
|
4077 | */
|
4078 | getWidth(): number;
|
4079 | /**
|
4080 | * Gets the text of the comment range.
|
4081 | */
|
4082 | getText(): string;
|
4083 | /**
|
4084 | * Gets if the comment range was forgotten.
|
4085 | *
|
4086 | * This will be true after any manipulations have occured to the source file this comment range was generated from.
|
4087 | */
|
4088 | wasForgotten(): boolean;
|
4089 | private _throwIfForgotten;
|
4090 | }
|
4091 |
|
4092 | export declare class ComputedPropertyName extends Node<ts.ComputedPropertyName> {
|
4093 | |
4094 |
|
4095 |
|
4096 | getExpression(): Expression;
|
4097 | }
|
4098 |
|
4099 | declare const IdentifierBase: Constructor<ReferenceFindableNode> & Constructor<RenameableNode> & typeof PrimaryExpression;
|
4100 |
|
4101 | export declare class Identifier extends IdentifierBase<ts.Identifier> {
|
4102 | |
4103 |
|
4104 |
|
4105 | getText(): string;
|
4106 | |
4107 |
|
4108 |
|
4109 |
|
4110 | getDefinitionNodes(): Node[];
|
4111 | |
4112 |
|
4113 |
|
4114 |
|
4115 | getDefinitions(): DefinitionInfo[];
|
4116 | |
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 | getImplementations(): ImplementationLocation[];
|
4122 | }
|
4123 |
|
4124 | export interface ForEachChildTraversalControl {
|
4125 | |
4126 |
|
4127 |
|
4128 | stop(): void;
|
4129 | }
|
4130 |
|
4131 | export interface ForEachDescendantTraversalControl extends ForEachChildTraversalControl {
|
4132 | |
4133 |
|
4134 |
|
4135 | skip(): void;
|
4136 | |
4137 |
|
4138 |
|
4139 | up(): void;
|
4140 | }
|
4141 |
|
4142 | export interface TransformTraversalControl {
|
4143 | |
4144 |
|
4145 |
|
4146 |
|
4147 | currentNode: ts.Node;
|
4148 | |
4149 |
|
4150 |
|
4151 | visitChildren(): ts.Node;
|
4152 | }
|
4153 |
|
4154 | export declare type NodePropertyToWrappedType<NodeType extends ts.Node, KeyName extends keyof NodeType, NonNullableNodeType = NonNullable<NodeType[KeyName]>> = NodeType[KeyName] extends ts.NodeArray<infer ArrayNodeTypeForNullable> | undefined ? CompilerNodeToWrappedType<ArrayNodeTypeForNullable>[] | undefined : NodeType[KeyName] extends ts.NodeArray<infer ArrayNodeType> ? CompilerNodeToWrappedType<ArrayNodeType>[] : NodeType[KeyName] extends ts.Node ? CompilerNodeToWrappedType<NodeType[KeyName]> : NonNullableNodeType extends ts.Node ? CompilerNodeToWrappedType<NonNullableNodeType> | undefined : NodeType[KeyName];
|
4155 |
|
4156 | export declare type NodeParentType<NodeType extends ts.Node> = NodeType extends ts.SourceFile ? CompilerNodeToWrappedType<NodeType["parent"]> | undefined : ts.Node extends NodeType ? CompilerNodeToWrappedType<NodeType["parent"]> | undefined : CompilerNodeToWrappedType<NodeType["parent"]>;
|
4157 |
|
4158 | export interface TextRange {
|
4159 | getPos(): number;
|
4160 | getEnd(): number;
|
4161 | }
|
4162 |
|
4163 | export declare class Node<NodeType extends ts.Node = ts.Node> implements TextRange {
|
4164 | |
4165 |
|
4166 |
|
4167 | readonly compilerNode: NodeType;
|
4168 | protected constructor();
|
4169 | /**
|
4170 | * Releases the node and all its descendants from the underlying node cache and ast.
|
4171 | *
|
4172 | * This is useful if you want to improve the performance of manipulation by not tracking this node anymore.
|
4173 | */
|
4174 | forget(): void;
|
4175 | /**
|
4176 | * Forgets the descendants of this node.
|
4177 | */
|
4178 | forgetDescendants(): this;
|
4179 | /**
|
4180 | * Gets if the compiler node was forgotten.
|
4181 | *
|
4182 | * This will be true when the compiler node was forgotten or removed.
|
4183 | */
|
4184 | wasForgotten(): boolean;
|
4185 | /**
|
4186 | * Gets the syntax kind.
|
4187 | */
|
4188 | getKind(): SyntaxKind;
|
4189 | /**
|
4190 | * Gets the syntax kind name.
|
4191 | */
|
4192 | getKindName(): string;
|
4193 | /**
|
4194 | * Prints the node using the compiler's printer.
|
4195 | * @param options - Options.
|
4196 | */
|
4197 | print(options?: PrintNodeOptions): string;
|
4198 | /**
|
4199 | * Gets the symbol or throws an error if it doesn't exist.
|
4200 | */
|
4201 | getSymbolOrThrow(): Symbol;
|
4202 | /**
|
4203 | * Gets the compiler symbol or undefined if it doesn't exist.
|
4204 | */
|
4205 | getSymbol(): Symbol | undefined;
|
4206 | /**
|
4207 | * Gets the type of the node.
|
4208 | */
|
4209 | getType(): Type;
|
4210 | /**
|
4211 | * If the node contains the provided range (inclusive).
|
4212 | * @param pos - Start position.
|
4213 | * @param end - End position.
|
4214 | */
|
4215 | containsRange(pos: number, end: number): boolean;
|
4216 | /**
|
4217 | * Gets if the specified position is within a string.
|
4218 | * @param pos - Position.
|
4219 | */
|
4220 | isInStringAtPos(pos: number): boolean;
|
4221 | /**
|
4222 | * Gets the first child by a condition or throws.
|
4223 | * @param condition - Condition.
|
4224 | */
|
4225 | getFirstChildOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4226 | /**
|
4227 | * Gets the first child by a condition or throws.
|
4228 | * @param condition - Condition.
|
4229 | */
|
4230 | getFirstChildOrThrow(condition?: (node: Node) => boolean): Node;
|
4231 | /**
|
4232 | * Gets the first child by a condition.
|
4233 | * @param condition - Condition.
|
4234 | */
|
4235 | getFirstChild<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4236 | /**
|
4237 | * Gets the first child by a condition.
|
4238 | * @param condition - Condition.
|
4239 | */
|
4240 | getFirstChild(condition?: (node: Node) => boolean): Node | undefined;
|
4241 | /**
|
4242 | * Gets the last child by a condition or throws.
|
4243 | * @param condition - Condition.
|
4244 | */
|
4245 | getLastChildOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4246 | /**
|
4247 | * Gets the last child by a condition or throws.
|
4248 | * @param condition - Condition.
|
4249 | */
|
4250 | getLastChildOrThrow(condition?: (node: Node) => boolean): Node;
|
4251 | /**
|
4252 | * Gets the last child by a condition.
|
4253 | * @param condition - Condition.
|
4254 | */
|
4255 | getLastChild<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4256 | /**
|
4257 | * Gets the last child by a condition.
|
4258 | * @param condition - Condition.
|
4259 | */
|
4260 | getLastChild(condition?: (node: Node) => boolean): Node | undefined;
|
4261 | /**
|
4262 | * Gets the first descendant by a condition or throws.
|
4263 | * @param condition - Condition.
|
4264 | */
|
4265 | getFirstDescendantOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4266 | /**
|
4267 | * Gets the first descendant by a condition or throws.
|
4268 | * @param condition - Condition.
|
4269 | */
|
4270 | getFirstDescendantOrThrow(condition?: (node: Node) => boolean): Node;
|
4271 | /**
|
4272 | * Gets the first descendant by a condition.
|
4273 | * @param condition - Condition.
|
4274 | */
|
4275 | getFirstDescendant<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4276 | /**
|
4277 | * Gets the first descendant by a condition.
|
4278 | * @param condition - Condition.
|
4279 | */
|
4280 | getFirstDescendant(condition?: (node: Node) => boolean): Node | undefined;
|
4281 | /**
|
4282 | * Gets the previous sibling or throws.
|
4283 | * @param condition - Optional condition for getting the previous sibling.
|
4284 | */
|
4285 | getPreviousSiblingOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4286 | /**
|
4287 | * Gets the previous sibling or throws.
|
4288 | * @param condition - Optional condition for getting the previous sibling.
|
4289 | */
|
4290 | getPreviousSiblingOrThrow(condition?: (node: Node) => boolean): Node;
|
4291 | /**
|
4292 | * Gets the previous sibling.
|
4293 | * @param condition - Optional condition for getting the previous sibling.
|
4294 | */
|
4295 | getPreviousSibling<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4296 | /**
|
4297 | * Gets the previous sibling.
|
4298 | * @param condition - Optional condition for getting the previous sibling.
|
4299 | */
|
4300 | getPreviousSibling(condition?: (node: Node) => boolean): Node | undefined;
|
4301 | /**
|
4302 | * Gets the next sibling or throws.
|
4303 | * @param condition - Optional condition for getting the next sibling.
|
4304 | */
|
4305 | getNextSiblingOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4306 | /**
|
4307 | * Gets the next sibling or throws.
|
4308 | * @param condition - Optional condition for getting the next sibling.
|
4309 | */
|
4310 | getNextSiblingOrThrow(condition?: (node: Node) => boolean): Node;
|
4311 | /**
|
4312 | * Gets the next sibling.
|
4313 | * @param condition - Optional condition for getting the next sibling.
|
4314 | */
|
4315 | getNextSibling<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4316 | /**
|
4317 | * Gets the next sibling.
|
4318 | * @param condition - Optional condition for getting the next sibling.
|
4319 | */
|
4320 | getNextSibling(condition?: (node: Node) => boolean): Node | undefined;
|
4321 | /**
|
4322 | * Gets the previous siblings.
|
4323 | *
|
4324 | * Note: Closest sibling is the zero index.
|
4325 | */
|
4326 | getPreviousSiblings(): Node[];
|
4327 | /**
|
4328 | * Gets the next siblings.
|
4329 | *
|
4330 | * Note: Closest sibling is the zero index.
|
4331 | */
|
4332 | getNextSiblings(): Node[];
|
4333 | /**
|
4334 | * Gets all the children of the node.
|
4335 | */
|
4336 | getChildren(): Node[];
|
4337 | /**
|
4338 | * Gets the child at the specified index.
|
4339 | * @param index - Index of the child.
|
4340 | */
|
4341 | getChildAtIndex(index: number): Node;
|
4342 | /**
|
4343 | * Gets the child syntax list or throws if it doesn't exist.
|
4344 | */
|
4345 | getChildSyntaxListOrThrow(): SyntaxList;
|
4346 | /**
|
4347 | * Gets the child syntax list if it exists.
|
4348 | */
|
4349 | getChildSyntaxList(): SyntaxList | undefined;
|
4350 | /**
|
4351 | * Invokes the `cbNode` callback for each child and the `cbNodeArray` for every array of nodes stored in properties of the node.
|
4352 | * If `cbNodeArray` is not defined, then it will pass every element of the array to `cbNode`.
|
4353 | *
|
4354 | * @remarks There exists a `traversal.stop()` function on the second parameter that allows stopping iteration.
|
4355 | * @param cbNode - Callback invoked for each child.
|
4356 | * @param cbNodeArray - Callback invoked for each array of nodes.
|
4357 | */
|
4358 | forEachChild(cbNode: (node: Node, traversal: ForEachChildTraversalControl) => void, cbNodeArray?: (nodes: Node[], traversal: ForEachChildTraversalControl) => void): void;
|
4359 | /**
|
4360 | * Invokes the `cbNode` callback for each descendant and the `cbNodeArray` for every array of nodes stored in properties of the node and descendant nodes.
|
4361 | * If `cbNodeArray` is not defined, then it will pass every element of the array to `cbNode`.
|
4362 | *
|
4363 | * @remarks There exists a `traversal` object on the second parameter that allows various control of iteration.
|
4364 | * @param cbNode - Callback invoked for each descendant.
|
4365 | * @param cbNodeArray - Callback invoked for each array of nodes.
|
4366 | */
|
4367 | forEachDescendant(cbNode: (node: Node, traversal: ForEachDescendantTraversalControl) => void, cbNodeArray?: (nodes: Node[], traversal: ForEachDescendantTraversalControl) => void): void;
|
4368 | /**
|
4369 | * Gets the node's descendants.
|
4370 | */
|
4371 | getDescendants(): Node[];
|
4372 | /**
|
4373 | * Gets the node's descendant statements.
|
4374 | */
|
4375 | getDescendantStatements(): Statement[];
|
4376 | /**
|
4377 | * Gets the number of children the node has.
|
4378 | */
|
4379 | getChildCount(): number;
|
4380 | /**
|
4381 | * Gets the child at the provided text position, or undefined if not found.
|
4382 | * @param pos - Text position to search for.
|
4383 | */
|
4384 | getChildAtPos(pos: number): Node | undefined;
|
4385 | /**
|
4386 | * Gets the most specific descendant at the provided text position, or undefined if not found.
|
4387 | * @param pos - Text position to search for.
|
4388 | */
|
4389 | getDescendantAtPos(pos: number): Node | undefined;
|
4390 | /**
|
4391 | * Gets the most specific descendant at the provided start text position with the specified width, or undefined if not found.
|
4392 | * @param start - Start text position to search for.
|
4393 | * @param width - Text length of the node to search for.
|
4394 | */
|
4395 | getDescendantAtStartWithWidth(start: number, width: number): Node | undefined;
|
4396 | /**
|
4397 | * Gets the source file text position where the node starts that includes the leading trivia (comments and whitespace).
|
4398 | */
|
4399 | getPos(): number;
|
4400 | /**
|
4401 | * Gets the source file text position where the node ends.
|
4402 | *
|
4403 | * @remarks This does not include the following trivia (comments and whitespace).
|
4404 | */
|
4405 | getEnd(): number;
|
4406 | /**
|
4407 | * Gets the source file text position where the node starts that does not include the leading trivia (comments and whitespace).
|
4408 | * @param includeJsDocComment - Whether to include the JS doc comment.
|
4409 | */
|
4410 | getStart(includeJsDocComment?: boolean): number;
|
4411 | /**
|
4412 | * Gets the source file text position of the end of the last significant token or the start of the source file.
|
4413 | */
|
4414 | getFullStart(): number;
|
4415 | /**
|
4416 | * Gets the first source file text position that is not whitespace.
|
4417 | */
|
4418 | getNonWhitespaceStart(): number;
|
4419 | /**
|
4420 | * Gets the text length of the node without trivia.
|
4421 | */
|
4422 | getWidth(): number;
|
4423 | /**
|
4424 | * Gets the text length of the node with trivia.
|
4425 | */
|
4426 | getFullWidth(): number;
|
4427 | /**
|
4428 | * Gets the node's leading trivia's text length.
|
4429 | */
|
4430 | getLeadingTriviaWidth(): number;
|
4431 | /**
|
4432 | * Gets the text length from the end of the current node to the next significant token or new line.
|
4433 | */
|
4434 | getTrailingTriviaWidth(): number;
|
4435 | /**
|
4436 | * Gets the text position of the next significant token or new line.
|
4437 | */
|
4438 | getTrailingTriviaEnd(): number;
|
4439 | /**
|
4440 | * Gets the text without leading trivia (comments and whitespace).
|
4441 | * @param includeJsDocComment
|
4442 | */
|
4443 | getText(includeJsDocComment?: boolean): string;
|
4444 | /**
|
4445 | * Gets the full text with leading trivia (comments and whitespace).
|
4446 | */
|
4447 | getFullText(): string;
|
4448 | /**
|
4449 | * Gets the combined modifier flags.
|
4450 | */
|
4451 | getCombinedModifierFlags(): ts.ModifierFlags;
|
4452 | /**
|
4453 | * Gets the source file.
|
4454 | */
|
4455 | getSourceFile(): SourceFile;
|
4456 | /**
|
4457 | * Gets a compiler node property wrapped in a Node.
|
4458 | * @param propertyName - Property name.
|
4459 | */
|
4460 | getNodeProperty<KeyType extends keyof LocalNodeType, LocalNodeType extends ts.Node = NodeType>(propertyName: KeyType): NodePropertyToWrappedType<LocalNodeType, KeyType>;
|
4461 | /**
|
4462 | * Goes up the tree getting all the parents in ascending order.
|
4463 | */
|
4464 | getAncestors(): Node[];
|
4465 | /**
|
4466 | * Get the node's parent.
|
4467 | */
|
4468 | getParent<T extends Node | undefined = NodeParentType<NodeType>>(): T;
|
4469 | /**
|
4470 | * Gets the parent or throws an error if it doesn't exist.
|
4471 | */
|
4472 | getParentOrThrow<T extends Node | undefined = NodeParentType<NodeType>>(): NonNullable<T>;
|
4473 | /**
|
4474 | * Goes up the parents (ancestors) of the node while a condition is true.
|
4475 | * Throws if the initial parent doesn't match the condition.
|
4476 | * @param condition - Condition that tests the parent to see if the expression is true.
|
4477 | */
|
4478 | getParentWhileOrThrow<T extends Node>(condition: (node: Node) => node is T): T;
|
4479 | /**
|
4480 | * Goes up the parents (ancestors) of the node while a condition is true.
|
4481 | * Throws if the initial parent doesn't match the condition.
|
4482 | * @param condition - Condition that tests the parent to see if the expression is true.
|
4483 | */
|
4484 | getParentWhileOrThrow(condition: (node: Node) => boolean): Node;
|
4485 | /**
|
4486 | * Goes up the parents (ancestors) of the node while a condition is true.
|
4487 | * Returns undefined if the initial parent doesn't match the condition.
|
4488 | * @param condition - Condition that tests the parent to see if the expression is true.
|
4489 | */
|
4490 | getParentWhile<T extends Node>(condition: (node: Node) => node is T): T | undefined;
|
4491 | /**
|
4492 | * Goes up the parents (ancestors) of the node while a condition is true.
|
4493 | * Returns undefined if the initial parent doesn't match the condition.
|
4494 | * @param condition - Condition that tests the parent to see if the expression is true.
|
4495 | */
|
4496 | getParentWhile(condition: (node: Node) => boolean): Node | undefined;
|
4497 | /**
|
4498 | * Goes up the parents (ancestors) of the node while the parent is the specified syntax kind.
|
4499 | * Throws if the initial parent is not the specified syntax kind.
|
4500 | * @param kind - Syntax kind to check for.
|
4501 | */
|
4502 | getParentWhileKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4503 | /**
|
4504 | * Goes up the parents (ancestors) of the node while the parent is the specified syntax kind.
|
4505 | * Returns undefined if the initial parent is not the specified syntax kind.
|
4506 | * @param kind - Syntax kind to check for.
|
4507 | */
|
4508 | getParentWhileKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4509 | /**
|
4510 | * Gets the last token of this node. Usually this is a close brace.
|
4511 | */
|
4512 | getLastToken(): Node;
|
4513 | /**
|
4514 | * Gets if this node is in a syntax list.
|
4515 | */
|
4516 | isInSyntaxList(): boolean;
|
4517 | /**
|
4518 | * Gets the parent if it's a syntax list or throws an error otherwise.
|
4519 | */
|
4520 | getParentSyntaxListOrThrow(): SyntaxList;
|
4521 | /**
|
4522 | * Gets the parent if it's a syntax list.
|
4523 | */
|
4524 | getParentSyntaxList(): SyntaxList | undefined;
|
4525 | /**
|
4526 | * Gets the child index of this node relative to the parent.
|
4527 | */
|
4528 | getChildIndex(): number;
|
4529 | /**
|
4530 | * Gets the indentation level of the current node.
|
4531 | */
|
4532 | getIndentationLevel(): number;
|
4533 | /**
|
4534 | * Gets the child indentation level of the current node.
|
4535 | */
|
4536 | getChildIndentationLevel(): number;
|
4537 | /**
|
4538 | * Gets the indentation text.
|
4539 | * @param offset - Optional number of levels of indentation to add or remove.
|
4540 | */
|
4541 | getIndentationText(offset?: number): string;
|
4542 | /**
|
4543 | * Gets the next indentation level text.
|
4544 | * @param offset - Optional number of levels of indentation to add or remove.
|
4545 | */
|
4546 | getChildIndentationText(offset?: number): string;
|
4547 | /**
|
4548 | * Gets the position of the start of the line that this node starts on.
|
4549 | * @param includeJsDocComment - Whether to include the JS doc comment or not.
|
4550 | */
|
4551 | getStartLinePos(includeJsDocComment?: boolean): number;
|
4552 | /**
|
4553 | * Gets the line number at the start of the node.
|
4554 | * @param includeJsDocComment - Whether to include the JS doc comment or not.
|
4555 | */
|
4556 | getStartLineNumber(includeJsDocComment?: boolean): number;
|
4557 | /**
|
4558 | * Gets the line number of the end of the node.
|
4559 | */
|
4560 | getEndLineNumber(): number;
|
4561 | /**
|
4562 | * Gets if this is the first node on the current line.
|
4563 | */
|
4564 | isFirstNodeOnLine(): boolean;
|
4565 | /**
|
4566 | * Replaces the text of the current node with new text.
|
4567 | *
|
4568 | * This will forget the current node and return a new node that can be asserted or type guarded to the correct type.
|
4569 | * @param textOrWriterFunction - Text or writer function to replace with.
|
4570 | * @returns The new node.
|
4571 | */
|
4572 | replaceWithText(textOrWriterFunction: string | WriterFunction): Node;
|
4573 | /**
|
4574 | * Prepends the specified whitespace to current node.
|
4575 | * @param textOrWriterFunction - Text or writer function.
|
4576 | */
|
4577 | prependWhitespace(textOrWriterFunction: string | WriterFunction): void;
|
4578 | /**
|
4579 | * Appends the specified whitespace to current node.
|
4580 | * @param textOrWriterFunction - Text or writer function.
|
4581 | */
|
4582 | appendWhitespace(textOrWriterFunction: string | WriterFunction): void;
|
4583 | /**
|
4584 | * Formats the node's text using the internal TypeScript formatting API.
|
4585 | * @param settings - Format code settings.
|
4586 | */
|
4587 | formatText(settings?: FormatCodeSettings): void;
|
4588 | /**
|
4589 | * Transforms the node using the compiler api nodes and functions (experimental).
|
4590 | *
|
4591 | * WARNING: This will forget descendants of transformed nodes.
|
4592 | * @example Increments all the numeric literals in a source file.
|
4593 | * ```ts
|
4594 | * sourceFile.transform(traversal => {
|
4595 | * const node = traversal.visitChildren();
|
4596 | * if (ts.isNumericLiteral(node))
|
4597 | * return ts.createNumericLiteral((parseInt(node.text, 10) + 1).toString());
|
4598 | * return node;
|
4599 | * });
|
4600 | * ```
|
4601 | * @example Updates the class declaration node without visiting the children.
|
4602 | * ```ts
|
4603 | * const classDec = sourceFile.getClassOrThrow("MyClass");
|
4604 | * classDec.transform(traversal => {
|
4605 | * const node = traversal.currentNode;
|
4606 | * return ts.updateClassDeclaration(node, undefined, undefined, ts.createIdentifier("MyUpdatedClass"), undefined, undefined, []);
|
4607 | * });
|
4608 | * ```
|
4609 | */
|
4610 | transform(visitNode: (traversal: TransformTraversalControl) => ts.Node): this;
|
4611 | /**
|
4612 | * Gets the leading comment ranges of the current node.
|
4613 | */
|
4614 | getLeadingCommentRanges(): CommentRange[];
|
4615 | /**
|
4616 | * Gets the trailing comment ranges of the current node.
|
4617 | */
|
4618 | getTrailingCommentRanges(): CommentRange[];
|
4619 | /**
|
4620 | * Gets the children based on a kind.
|
4621 | * @param kind - Syntax kind.
|
4622 | */
|
4623 | getChildrenOfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind][];
|
4624 | /**
|
4625 | * Gets the first child by syntax kind or throws an error if not found.
|
4626 | * @param kind - Syntax kind.
|
4627 | */
|
4628 | getFirstChildByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4629 | /**
|
4630 | * Gets the first child by syntax kind.
|
4631 | * @param kind - Syntax kind.
|
4632 | */
|
4633 | getFirstChildByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4634 | /**
|
4635 | * Gets the first child if it matches the specified syntax kind or throws an error if not found.
|
4636 | * @param kind - Syntax kind.
|
4637 | */
|
4638 | getFirstChildIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4639 | /**
|
4640 | * Gets the first child if it matches the specified syntax kind.
|
4641 | * @param kind - Syntax kind.
|
4642 | */
|
4643 | getFirstChildIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4644 | /**
|
4645 | * Gets the last child by syntax kind or throws an error if not found.
|
4646 | * @param kind - Syntax kind.
|
4647 | */
|
4648 | getLastChildByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4649 | /**
|
4650 | * Gets the last child by syntax kind.
|
4651 | * @param kind - Syntax kind.
|
4652 | */
|
4653 | getLastChildByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4654 | /**
|
4655 | * Gets the last child if it matches the specified syntax kind or throws an error if not found.
|
4656 | * @param kind - Syntax kind.
|
4657 | */
|
4658 | getLastChildIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4659 | /**
|
4660 | * Gets the last child if it matches the specified syntax kind.
|
4661 | * @param kind - Syntax kind.
|
4662 | */
|
4663 | getLastChildIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4664 | /**
|
4665 | * Gets the child at the specified index if it's the specified kind or throws an exception.
|
4666 | * @param index - Child index to get.
|
4667 | * @param kind - Expected kind.
|
4668 | */
|
4669 | getChildAtIndexIfKindOrThrow<TKind extends SyntaxKind>(index: number, kind: TKind): KindToNodeMappings[TKind];
|
4670 | /**
|
4671 | * Gets the child at the specified index if it's the specified kind or returns undefined.
|
4672 | * @param index - Child index to get.
|
4673 | * @param kind - Expected kind.
|
4674 | */
|
4675 | getChildAtIndexIfKind<TKind extends SyntaxKind>(index: number, kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4676 | /**
|
4677 | * Gets the previous sibiling if it matches the specified kind, or throws.
|
4678 | * @param kind - Kind to check.
|
4679 | */
|
4680 | getPreviousSiblingIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4681 | /**
|
4682 | * Gets the next sibiling if it matches the specified kind, or throws.
|
4683 | * @param kind - Kind to check.
|
4684 | */
|
4685 | getNextSiblingIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4686 | /**
|
4687 | * Gets the previous sibling if it matches the specified kind.
|
4688 | * @param kind - Kind to check.
|
4689 | */
|
4690 | getPreviousSiblingIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4691 | /**
|
4692 | * Gets the next sibling if it matches the specified kind.
|
4693 | * @param kind - Kind to check.
|
4694 | */
|
4695 | getNextSiblingIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4696 | /**
|
4697 | * Gets the parent if it's a certain syntax kind.
|
4698 | */
|
4699 | getParentIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4700 | /**
|
4701 | * Gets the parent if it's a certain syntax kind of throws.
|
4702 | */
|
4703 | getParentIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4704 | /**
|
4705 | * Gets the first ancestor by syntax kind or throws if not found.
|
4706 | * @param kind - Syntax kind.
|
4707 | */
|
4708 | getFirstAncestorByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4709 | /**
|
4710 | * Get the first ancestor by syntax kind.
|
4711 | * @param kind - Syntax kind.
|
4712 | */
|
4713 | getFirstAncestorByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4714 | /**
|
4715 | * Gets the first ancestor that matches the provided condition or throws if not found.
|
4716 | * @param condition - Condition to match.
|
4717 | */
|
4718 | getFirstAncestorOrThrow<T extends Node>(condition?: (node: Node) => node is T): T;
|
4719 | /**
|
4720 | * Gets the first ancestor that matches the provided condition or throws if not found.
|
4721 | * @param condition - Condition to match.
|
4722 | */
|
4723 | getFirstAncestorOrThrow(condition?: (node: Node) => boolean): Node;
|
4724 | /**
|
4725 | * Gets the first ancestor that matches the provided condition or returns undefined if not found.
|
4726 | * @param condition - Condition to match.
|
4727 | */
|
4728 | getFirstAncestor<T extends Node>(condition?: (node: Node) => node is T): T | undefined;
|
4729 | /**
|
4730 | * Gets the first ancestor that matches the provided condition or returns undefined if not found.
|
4731 | * @param condition - Condition to match.
|
4732 | */
|
4733 | getFirstAncestor(condition?: (node: Node) => boolean): Node | undefined;
|
4734 | /**
|
4735 | * Gets the descendants that match a specified syntax kind.
|
4736 | * @param kind - Kind to check.
|
4737 | */
|
4738 | getDescendantsOfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind][];
|
4739 | /**
|
4740 | * Gets the first descendant by syntax kind or throws.
|
4741 | * @param kind - Syntax kind.
|
4742 | */
|
4743 | getFirstDescendantByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
4744 | /**
|
4745 | * Gets the first descendant by syntax kind.
|
4746 | * @param kind - Syntax kind.
|
4747 | */
|
4748 | getFirstDescendantByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
4749 | }
|
4750 |
|
4751 | export declare class QualifiedName extends Node<ts.QualifiedName> {
|
4752 | |
4753 |
|
4754 |
|
4755 | getLeft(): EntityName;
|
4756 | |
4757 |
|
4758 |
|
4759 | getRight(): Identifier;
|
4760 | }
|
4761 | export declare enum Scope {
|
4762 | Public = "public",
|
4763 | Protected = "protected",
|
4764 | Private = "private"
|
4765 | }
|
4766 |
|
4767 | export declare class SyntaxList extends Node<ts.SyntaxList> {
|
4768 | |
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 | addChildText(textOrWriterFunction: string | WriterFunction): Node<ts.Node>[];
|
4774 | |
4775 |
|
4776 |
|
4777 |
|
4778 |
|
4779 |
|
4780 | insertChildText(index: number, textOrWriterFunction: string | WriterFunction): Node<ts.Node>[];
|
4781 | }
|
4782 |
|
4783 | export declare type CompilerNodeToWrappedType<T extends ts.Node> = T extends ts.ObjectDestructuringAssignment ? ObjectDestructuringAssignment : T extends ts.ArrayDestructuringAssignment ? ArrayDestructuringAssignment : T extends ts.SuperElementAccessExpression ? SuperElementAccessExpression : T extends ts.SuperPropertyAccessExpression ? SuperPropertyAccessExpression : T extends ts.AssignmentExpression<infer U> ? AssignmentExpression<ts.AssignmentExpression<U>> : T["kind"] extends keyof ImplementedKindToNodeMappings ? ImplementedKindToNodeMappings[T["kind"]] : T extends ts.SyntaxList ? SyntaxList : T extends ts.TypeNode ? TypeNode : T extends ts.TypeElement ? TypeElement : T extends ts.JSDocTag ? JSDocTag : T extends ts.LiteralExpression ? LiteralExpression : T extends ts.PrimaryExpression ? PrimaryExpression : T extends ts.MemberExpression ? MemberExpression : T extends ts.LeftHandSideExpression ? LeftHandSideExpression : T extends ts.UpdateExpression ? UpdateExpression : T extends ts.UnaryExpression ? UnaryExpression : T extends ts.Expression ? Expression : T extends ts.IterationStatement ? IterationStatement : T extends ts.Statement ? Statement : Node<T>;
|
4784 |
|
4785 | declare const DecoratorBase: typeof Node;
|
4786 |
|
4787 | export declare class Decorator extends DecoratorBase<ts.Decorator> {
|
4788 | |
4789 |
|
4790 |
|
4791 | getName(): string;
|
4792 | |
4793 |
|
4794 |
|
4795 | getNameNode(): Identifier;
|
4796 | |
4797 |
|
4798 |
|
4799 | getFullName(): string;
|
4800 | |
4801 |
|
4802 |
|
4803 | isDecoratorFactory(): boolean;
|
4804 | |
4805 |
|
4806 |
|
4807 |
|
4808 | setIsDecoratorFactory(isDecoratorFactory: boolean): this;
|
4809 | |
4810 |
|
4811 |
|
4812 | getCallExpressionOrThrow(): CallExpression;
|
4813 | |
4814 |
|
4815 |
|
4816 | getCallExpression(): CallExpression | undefined;
|
4817 | |
4818 |
|
4819 |
|
4820 | getExpression(): Expression<ts.LeftHandSideExpression>;
|
4821 | |
4822 |
|
4823 |
|
4824 | getArguments(): Node[];
|
4825 | |
4826 |
|
4827 |
|
4828 | getTypeArguments(): TypeNode[];
|
4829 | |
4830 |
|
4831 |
|
4832 |
|
4833 | addTypeArgument(argumentText: string): TypeNode<ts.TypeNode>;
|
4834 | |
4835 |
|
4836 |
|
4837 |
|
4838 | addTypeArguments(argumentTexts: ReadonlyArray<string>): TypeNode<ts.TypeNode>[];
|
4839 | |
4840 |
|
4841 |
|
4842 |
|
4843 |
|
4844 | insertTypeArgument(index: number, argumentText: string): TypeNode<ts.TypeNode>;
|
4845 | |
4846 |
|
4847 |
|
4848 |
|
4849 |
|
4850 | insertTypeArguments(index: number, argumentTexts: ReadonlyArray<string>): TypeNode<ts.TypeNode>[];
|
4851 | |
4852 |
|
4853 |
|
4854 |
|
4855 | removeTypeArgument(typeArg: Node): this;
|
4856 | |
4857 |
|
4858 |
|
4859 |
|
4860 | removeTypeArgument(index: number): this;
|
4861 | |
4862 |
|
4863 |
|
4864 |
|
4865 | addArgument(argumentText: string | WriterFunction): Node<ts.Node>;
|
4866 | |
4867 |
|
4868 |
|
4869 |
|
4870 | addArguments(argumentTexts: ReadonlyArray<string | WriterFunction> | WriterFunction): Node<ts.Node>[];
|
4871 | |
4872 |
|
4873 |
|
4874 |
|
4875 |
|
4876 | insertArgument(index: number, argumentText: string | WriterFunction): Node<ts.Node>;
|
4877 | |
4878 |
|
4879 |
|
4880 |
|
4881 |
|
4882 | insertArguments(index: number, argumentTexts: ReadonlyArray<string | WriterFunction> | WriterFunction): Node<ts.Node>[];
|
4883 | |
4884 |
|
4885 |
|
4886 |
|
4887 | removeArgument(node: Node): this;
|
4888 | |
4889 |
|
4890 |
|
4891 |
|
4892 | removeArgument(index: number): this;
|
4893 | |
4894 |
|
4895 |
|
4896 | remove(): void;
|
4897 | |
4898 |
|
4899 |
|
4900 |
|
4901 | set(structure: Partial<DecoratorStructure>): this;
|
4902 | |
4903 |
|
4904 |
|
4905 | getStructure(): DecoratorStructure;
|
4906 | }
|
4907 |
|
4908 | export declare function JSDocPropertyLikeTag<T extends Constructor<JSDocPropertyLikeTagExtensionType>>(Base: T): Constructor<JSDocPropertyLikeTag> & T;
|
4909 |
|
4910 | export interface JSDocPropertyLikeTag {
|
4911 |
|
4912 | getName(): string;
|
4913 |
|
4914 | getNameNode(): EntityName;
|
4915 | }
|
4916 |
|
4917 | declare type JSDocPropertyLikeTagExtensionType = Node<ts.JSDocPropertyLikeTag> & JSDocTag;
|
4918 |
|
4919 | declare const JSDocBase: typeof Node;
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 | export declare class JSDoc extends JSDocBase<ts.JSDoc> {
|
4925 | |
4926 |
|
4927 |
|
4928 | getTags(): JSDocTag[];
|
4929 | |
4930 |
|
4931 |
|
4932 | getComment(): string | undefined;
|
4933 | |
4934 |
|
4935 |
|
4936 | getInnerText(): string;
|
4937 | |
4938 |
|
4939 |
|
4940 |
|
4941 | setComment(textOrWriterFunction: string | WriterFunction): this;
|
4942 | |
4943 |
|
4944 |
|
4945 | remove(): void;
|
4946 | |
4947 |
|
4948 |
|
4949 |
|
4950 | set(structure: Partial<JSDocStructure>): this;
|
4951 | |
4952 |
|
4953 |
|
4954 | getStructure(): JSDocStructure;
|
4955 | }
|
4956 |
|
4957 |
|
4958 |
|
4959 |
|
4960 | export declare class JSDocAugmentsTag extends JSDocTag<ts.JSDocAugmentsTag> {
|
4961 | }
|
4962 |
|
4963 |
|
4964 |
|
4965 |
|
4966 | export declare class JSDocClassTag extends JSDocTag<ts.JSDocClassTag> {
|
4967 | }
|
4968 |
|
4969 | declare const JSDocParameterTagBase: Constructor<JSDocPropertyLikeTag> & typeof JSDocTag;
|
4970 |
|
4971 |
|
4972 |
|
4973 |
|
4974 | export declare class JSDocParameterTag extends JSDocParameterTagBase<ts.JSDocParameterTag> {
|
4975 | }
|
4976 |
|
4977 | declare const JSDocPropertyTagBase: Constructor<JSDocPropertyLikeTag> & typeof JSDocTag;
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 | export declare class JSDocPropertyTag extends JSDocPropertyTagBase<ts.JSDocPropertyTag> {
|
4983 | }
|
4984 |
|
4985 |
|
4986 |
|
4987 |
|
4988 | export declare class JSDocReturnTag extends JSDocTag<ts.JSDocReturnTag> {
|
4989 | }
|
4990 |
|
4991 |
|
4992 |
|
4993 |
|
4994 | export declare class JSDocTag<NodeType extends ts.JSDocTag = ts.JSDocTag> extends Node<NodeType> {
|
4995 | |
4996 |
|
4997 |
|
4998 | getTagName(): string;
|
4999 | |
5000 |
|
5001 |
|
5002 | getTagNameNode(): Identifier;
|
5003 | |
5004 |
|
5005 |
|
5006 | getComment(): string | undefined;
|
5007 | }
|
5008 |
|
5009 |
|
5010 |
|
5011 |
|
5012 | export declare class JSDocTagInfo {
|
5013 | private constructor();
|
5014 | /** Gets the compiler JS doc tag info. */
|
5015 | readonly compilerObject: ts.JSDocTagInfo;
|
5016 | /**
|
5017 | * Gets the name.
|
5018 | */
|
5019 | getName(): string;
|
5020 | /**
|
5021 | * Gets the text.
|
5022 | */
|
5023 | getText(): string | undefined;
|
5024 | }
|
5025 |
|
5026 | /**
|
5027 | * JS doc type def tag node.
|
5028 | */
|
5029 | export declare class JSDocTypedefTag extends JSDocTag<ts.JSDocTypedefTag> {
|
5030 | }
|
5031 |
|
5032 |
|
5033 |
|
5034 |
|
5035 | export declare class JSDocTypeTag extends JSDocTag<ts.JSDocTypeTag> {
|
5036 | }
|
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 | export declare class JSDocUnknownTag extends JSDocTag<ts.JSDocUnknownTag> {
|
5042 | }
|
5043 |
|
5044 | declare const EnumDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<NamespaceChildableNode> & Constructor<JSDocableNode> & Constructor<AmbientableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & Constructor<NamedNode> & typeof Statement;
|
5045 |
|
5046 | export declare class EnumDeclaration extends EnumDeclarationBase<ts.EnumDeclaration> {
|
5047 | |
5048 |
|
5049 |
|
5050 |
|
5051 | set(structure: Partial<EnumDeclarationStructure>): this;
|
5052 | |
5053 |
|
5054 |
|
5055 |
|
5056 | addMember(structure: EnumMemberStructure): EnumMember;
|
5057 | |
5058 |
|
5059 |
|
5060 |
|
5061 | addMembers(structures: ReadonlyArray<EnumMemberStructure>): EnumMember[];
|
5062 | |
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 | insertMember(index: number, structure: EnumMemberStructure): EnumMember;
|
5068 | |
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 | insertMembers(index: number, structures: ReadonlyArray<EnumMemberStructure>): EnumMember[];
|
5074 | |
5075 |
|
5076 |
|
5077 |
|
5078 | getMember(name: string): EnumMember | undefined;
|
5079 | |
5080 |
|
5081 |
|
5082 |
|
5083 | getMember(findFunction: (declaration: EnumMember) => boolean): EnumMember | undefined;
|
5084 | |
5085 |
|
5086 |
|
5087 |
|
5088 | getMemberOrThrow(name: string): EnumMember;
|
5089 | |
5090 |
|
5091 |
|
5092 |
|
5093 | getMemberOrThrow(findFunction: (declaration: EnumMember) => boolean): EnumMember;
|
5094 | |
5095 |
|
5096 |
|
5097 | getMembers(): EnumMember[];
|
5098 | |
5099 |
|
5100 |
|
5101 | setIsConstEnum(value: boolean): this;
|
5102 | |
5103 |
|
5104 |
|
5105 | isConstEnum(): boolean;
|
5106 | |
5107 |
|
5108 |
|
5109 | getConstKeyword(): Node<ts.Node> | undefined;
|
5110 | |
5111 |
|
5112 |
|
5113 | getStructure(): EnumDeclarationStructure;
|
5114 | }
|
5115 |
|
5116 | declare const EnumMemberBase: Constructor<JSDocableNode> & Constructor<InitializerExpressionableNode> & Constructor<PropertyNamedNode> & typeof Node;
|
5117 |
|
5118 | export declare class EnumMember extends EnumMemberBase<ts.EnumMember> {
|
5119 | |
5120 |
|
5121 |
|
5122 | getValue(): string | number | undefined;
|
5123 | |
5124 |
|
5125 |
|
5126 |
|
5127 | setValue(value: string | number): this;
|
5128 | |
5129 |
|
5130 |
|
5131 | remove(): void;
|
5132 | |
5133 |
|
5134 |
|
5135 |
|
5136 | set(structure: Partial<EnumMemberStructure>): this;
|
5137 | |
5138 |
|
5139 |
|
5140 | getStructure(): EnumMemberStructure;
|
5141 | }
|
5142 |
|
5143 | declare const ArrayDestructuringAssignmentBase: typeof AssignmentExpression;
|
5144 |
|
5145 | export declare class ArrayDestructuringAssignment extends ArrayDestructuringAssignmentBase<ts.ArrayDestructuringAssignment> {
|
5146 | |
5147 |
|
5148 |
|
5149 | getLeft(): ArrayLiteralExpression;
|
5150 | }
|
5151 |
|
5152 | export declare class ArrayLiteralExpression extends PrimaryExpression<ts.ArrayLiteralExpression> {
|
5153 | |
5154 |
|
5155 |
|
5156 | getElements(): Expression[];
|
5157 | |
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 | addElement(textOrWriterFunction: string | WriterFunction, options?: {
|
5163 | useNewLines?: boolean;
|
5164 | }): Expression<ts.Expression>;
|
5165 | |
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 | addElements(textsOrWriterFunction: ReadonlyArray<string | WriterFunction> | WriterFunction, options?: {
|
5171 | useNewLines?: boolean;
|
5172 | }): Expression<ts.Expression>[];
|
5173 | |
5174 |
|
5175 |
|
5176 |
|
5177 |
|
5178 |
|
5179 | insertElement(index: number, textOrWriterFunction: string | WriterFunction, options?: {
|
5180 | useNewLines?: boolean;
|
5181 | }): Expression<ts.Expression>;
|
5182 | |
5183 |
|
5184 |
|
5185 |
|
5186 |
|
5187 |
|
5188 | insertElements(index: number, textsOrWriterFunction: ReadonlyArray<string | WriterFunction> | WriterFunction, options?: {
|
5189 | useNewLines?: boolean;
|
5190 | }): Expression<ts.Expression>[];
|
5191 | |
5192 |
|
5193 |
|
5194 |
|
5195 | removeElement(index: number): void;
|
5196 | |
5197 |
|
5198 |
|
5199 |
|
5200 | removeElement(element: Expression): void;
|
5201 | }
|
5202 |
|
5203 | declare const AsExpressionBase: Constructor<TypedNode> & Constructor<ExpressionedNode> & typeof Expression;
|
5204 |
|
5205 | export declare class AsExpression extends AsExpressionBase<ts.AsExpression> {
|
5206 | }
|
5207 |
|
5208 | declare const AssignmentExpressionBase: typeof BinaryExpression;
|
5209 |
|
5210 | export declare class AssignmentExpression<T extends ts.AssignmentExpression<ts.AssignmentOperatorToken> = ts.AssignmentExpression<ts.AssignmentOperatorToken>> extends AssignmentExpressionBase<T> {
|
5211 | |
5212 |
|
5213 |
|
5214 | getOperatorToken(): Node<ts.Token<ts.AssignmentOperator>>;
|
5215 | }
|
5216 |
|
5217 | declare const AwaitExpressionBase: Constructor<UnaryExpressionedNode> & typeof UnaryExpression;
|
5218 |
|
5219 | export declare class AwaitExpression extends AwaitExpressionBase<ts.AwaitExpression> {
|
5220 | }
|
5221 |
|
5222 | declare const BinaryExpressionBase: typeof Expression;
|
5223 |
|
5224 | export declare class BinaryExpression<T extends ts.BinaryExpression = ts.BinaryExpression> extends BinaryExpressionBase<T> {
|
5225 | |
5226 |
|
5227 |
|
5228 | getLeft(): Expression;
|
5229 | |
5230 |
|
5231 |
|
5232 | getOperatorToken(): Node<ts.Token<ts.BinaryOperator>>;
|
5233 | |
5234 |
|
5235 |
|
5236 | getRight(): Expression;
|
5237 | }
|
5238 |
|
5239 | declare const CallExpressionBase: Constructor<TypeArgumentedNode> & Constructor<ArgumentedNode> & Constructor<LeftHandSideExpressionedNode> & typeof LeftHandSideExpression;
|
5240 |
|
5241 | export declare class CallExpression<T extends ts.CallExpression = ts.CallExpression> extends CallExpressionBase<T> {
|
5242 | |
5243 |
|
5244 |
|
5245 | getReturnType(): Type;
|
5246 | }
|
5247 |
|
5248 | declare const CommaListExpressionBase: typeof Expression;
|
5249 |
|
5250 | export declare class CommaListExpression extends CommaListExpressionBase<ts.CommaListExpression> {
|
5251 | |
5252 |
|
5253 |
|
5254 | getElements(): Expression[];
|
5255 | }
|
5256 |
|
5257 | declare const ConditionalExpressionBase: typeof Expression;
|
5258 |
|
5259 | export declare class ConditionalExpression extends ConditionalExpressionBase<ts.ConditionalExpression> {
|
5260 | |
5261 |
|
5262 |
|
5263 | getCondition(): Expression;
|
5264 | |
5265 |
|
5266 |
|
5267 | getQuestionToken(): Node<ts.Token<SyntaxKind.QuestionToken>>;
|
5268 | |
5269 |
|
5270 |
|
5271 | getWhenTrue(): Expression;
|
5272 | |
5273 |
|
5274 |
|
5275 | getColonToken(): Node<ts.Token<SyntaxKind.ColonToken>>;
|
5276 | |
5277 |
|
5278 |
|
5279 | getWhenFalse(): Expression;
|
5280 | }
|
5281 |
|
5282 | declare const DeleteExpressionBase: Constructor<UnaryExpressionedNode> & typeof UnaryExpression;
|
5283 |
|
5284 | export declare class DeleteExpression extends DeleteExpressionBase<ts.DeleteExpression> {
|
5285 | }
|
5286 |
|
5287 | declare const ElementAccessExpressionBase: Constructor<LeftHandSideExpressionedNode> & typeof MemberExpression;
|
5288 |
|
5289 | export declare class ElementAccessExpression<T extends ts.ElementAccessExpression = ts.ElementAccessExpression> extends ElementAccessExpressionBase<T> {
|
5290 | |
5291 |
|
5292 |
|
5293 | getArgumentExpression(): Expression | undefined;
|
5294 | |
5295 |
|
5296 |
|
5297 | getArgumentExpressionOrThrow(): Expression<ts.Expression>;
|
5298 | }
|
5299 |
|
5300 | export declare class Expression<T extends ts.Expression = ts.Expression> extends Node<T> {
|
5301 | |
5302 |
|
5303 |
|
5304 | getContextualType(): Type | undefined;
|
5305 | }
|
5306 |
|
5307 | export declare function ExpressionedNode<T extends Constructor<ExpressionedNodeExtensionType>>(Base: T): Constructor<ExpressionedNode> & T;
|
5308 |
|
5309 | export interface ExpressionedNode {
|
5310 | |
5311 |
|
5312 |
|
5313 | getExpression(): Expression;
|
5314 | |
5315 |
|
5316 |
|
5317 |
|
5318 | setExpression(textOrWriterFunction: string | WriterFunction): this;
|
5319 | }
|
5320 |
|
5321 | declare type ExpressionedNodeExtensionType = Node<ts.Node & {
|
5322 | expression: ts.Expression;
|
5323 | }>;
|
5324 |
|
5325 | export declare function ImportExpressionedNode<T extends Constructor<ImportExpressionedNodeExtensionType>>(Base: T): Constructor<ImportExpressionedNode> & T;
|
5326 |
|
5327 | export interface ImportExpressionedNode {
|
5328 | |
5329 |
|
5330 |
|
5331 | getExpression(): ImportExpression;
|
5332 | }
|
5333 |
|
5334 | declare type ImportExpressionedNodeExtensionType = Node<ts.Node & {
|
5335 | expression: ts.ImportExpression;
|
5336 | }>;
|
5337 |
|
5338 | export declare function LeftHandSideExpressionedNode<T extends Constructor<LeftHandSideExpressionedNodeExtensionType>>(Base: T): Constructor<LeftHandSideExpressionedNode> & T;
|
5339 |
|
5340 | export interface LeftHandSideExpressionedNode {
|
5341 | |
5342 |
|
5343 |
|
5344 | getExpression(): LeftHandSideExpression;
|
5345 | }
|
5346 |
|
5347 | declare type LeftHandSideExpressionedNodeExtensionType = Node<ts.Node & {
|
5348 | expression: ts.LeftHandSideExpression;
|
5349 | }>;
|
5350 |
|
5351 | export declare function SuperExpressionedNode<T extends Constructor<SuperExpressionedNodeExtensionType>>(Base: T): Constructor<SuperExpressionedNode> & T;
|
5352 |
|
5353 | export interface SuperExpressionedNode {
|
5354 | |
5355 |
|
5356 |
|
5357 | getExpression(): SuperExpression;
|
5358 | }
|
5359 |
|
5360 | declare type SuperExpressionedNodeExtensionType = Node<ts.Node & {
|
5361 | expression: ts.SuperExpression;
|
5362 | }>;
|
5363 |
|
5364 | export declare function UnaryExpressionedNode<T extends Constructor<UnaryExpressionedNodeExtensionType>>(Base: T): Constructor<UnaryExpressionedNode> & T;
|
5365 |
|
5366 | export interface UnaryExpressionedNode {
|
5367 | |
5368 |
|
5369 |
|
5370 | getExpression(): UnaryExpression;
|
5371 | }
|
5372 |
|
5373 | declare type UnaryExpressionedNodeExtensionType = Node<ts.Node & {
|
5374 | expression: ts.UnaryExpression;
|
5375 | }>;
|
5376 |
|
5377 | declare const ImportExpressionBase: typeof PrimaryExpression;
|
5378 |
|
5379 | export declare class ImportExpression extends ImportExpressionBase<ts.ImportExpression> {
|
5380 | }
|
5381 |
|
5382 | export declare class LeftHandSideExpression<T extends ts.LeftHandSideExpression = ts.LeftHandSideExpression> extends UpdateExpression<T> {
|
5383 | }
|
5384 |
|
5385 | declare const LiteralExpressionBase: Constructor<LiteralLikeNode> & typeof PrimaryExpression;
|
5386 |
|
5387 | export declare class LiteralExpression<T extends ts.LiteralExpression = ts.LiteralExpression> extends LiteralExpressionBase<T> {
|
5388 | }
|
5389 |
|
5390 | export declare class MemberExpression<T extends ts.MemberExpression = ts.MemberExpression> extends LeftHandSideExpression<T> {
|
5391 | }
|
5392 |
|
5393 | declare const MetaPropertyBase: Constructor<NamedNode> & typeof PrimaryExpression;
|
5394 |
|
5395 | export declare class MetaProperty extends MetaPropertyBase<ts.MetaProperty> {
|
5396 | |
5397 |
|
5398 |
|
5399 | getKeywordToken(): SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword;
|
5400 | }
|
5401 |
|
5402 | declare const NewExpressionBase: Constructor<TypeArgumentedNode> & Constructor<ArgumentedNode> & Constructor<LeftHandSideExpressionedNode> & typeof PrimaryExpression;
|
5403 |
|
5404 | export declare class NewExpression extends NewExpressionBase<ts.NewExpression> {
|
5405 | }
|
5406 |
|
5407 | declare const NonNullExpressionBase: Constructor<ExpressionedNode> & typeof LeftHandSideExpression;
|
5408 |
|
5409 | export declare class NonNullExpression extends NonNullExpressionBase<ts.NonNullExpression> {
|
5410 | }
|
5411 |
|
5412 | declare const ObjectDestructuringAssignmentBase: typeof AssignmentExpression;
|
5413 |
|
5414 | export declare class ObjectDestructuringAssignment extends ObjectDestructuringAssignmentBase<ts.ObjectDestructuringAssignment> {
|
5415 | |
5416 |
|
5417 |
|
5418 | getLeft(): ObjectLiteralExpression;
|
5419 | }
|
5420 |
|
5421 | declare const ObjectLiteralExpressionBase: typeof PrimaryExpression;
|
5422 |
|
5423 | export declare class ObjectLiteralExpression extends ObjectLiteralExpressionBase<ts.ObjectLiteralExpression> {
|
5424 | |
5425 |
|
5426 |
|
5427 |
|
5428 | getPropertyOrThrow(name: string): ObjectLiteralElementLike;
|
5429 | |
5430 |
|
5431 |
|
5432 |
|
5433 | getPropertyOrThrow(findFunction: (property: ObjectLiteralElementLike) => boolean): ObjectLiteralElementLike;
|
5434 | |
5435 |
|
5436 |
|
5437 |
|
5438 | getProperty(name: string): ObjectLiteralElementLike | undefined;
|
5439 | |
5440 |
|
5441 |
|
5442 |
|
5443 | getProperty(findFunction: (property: ObjectLiteralElementLike) => boolean): ObjectLiteralElementLike | undefined;
|
5444 | |
5445 |
|
5446 |
|
5447 | getProperties(): ObjectLiteralElementLike[];
|
5448 | |
5449 |
|
5450 |
|
5451 |
|
5452 | addPropertyAssignment(structure: PropertyAssignmentStructure): PropertyAssignment;
|
5453 | |
5454 |
|
5455 |
|
5456 |
|
5457 | addPropertyAssignments(structures: ReadonlyArray<PropertyAssignmentStructure>): PropertyAssignment[];
|
5458 | |
5459 |
|
5460 |
|
5461 |
|
5462 |
|
5463 | insertPropertyAssignment(index: number, structure: PropertyAssignmentStructure): PropertyAssignment;
|
5464 | |
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 | insertPropertyAssignments(index: number, structures: ReadonlyArray<PropertyAssignmentStructure>): PropertyAssignment[];
|
5470 | |
5471 |
|
5472 |
|
5473 |
|
5474 | addShorthandPropertyAssignment(structure: ShorthandPropertyAssignmentStructure): ShorthandPropertyAssignment;
|
5475 | |
5476 |
|
5477 |
|
5478 |
|
5479 | addShorthandPropertyAssignments(structures: ReadonlyArray<ShorthandPropertyAssignmentStructure>): ShorthandPropertyAssignment[];
|
5480 | |
5481 |
|
5482 |
|
5483 |
|
5484 |
|
5485 | insertShorthandPropertyAssignment(index: number, structure: ShorthandPropertyAssignmentStructure): ShorthandPropertyAssignment;
|
5486 | |
5487 |
|
5488 |
|
5489 |
|
5490 |
|
5491 | insertShorthandPropertyAssignments(index: number, structures: ReadonlyArray<ShorthandPropertyAssignmentStructure>): ShorthandPropertyAssignment[];
|
5492 | |
5493 |
|
5494 |
|
5495 |
|
5496 | addSpreadAssignment(structure: SpreadAssignmentStructure): SpreadAssignment;
|
5497 | |
5498 |
|
5499 |
|
5500 |
|
5501 | addSpreadAssignments(structures: ReadonlyArray<SpreadAssignmentStructure>): SpreadAssignment[];
|
5502 | |
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 | insertSpreadAssignment(index: number, structure: SpreadAssignmentStructure): SpreadAssignment;
|
5508 | |
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 | insertSpreadAssignments(index: number, structures: ReadonlyArray<SpreadAssignmentStructure>): SpreadAssignment[];
|
5514 | |
5515 |
|
5516 |
|
5517 |
|
5518 | addMethod(structure: MethodDeclarationStructure): MethodDeclaration;
|
5519 | |
5520 |
|
5521 |
|
5522 |
|
5523 | addMethods(structures: ReadonlyArray<MethodDeclarationStructure>): MethodDeclaration[];
|
5524 | |
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 | insertMethod(index: number, structure: MethodDeclarationStructure): MethodDeclaration;
|
5530 | |
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 | insertMethods(index: number, structures: ReadonlyArray<MethodDeclarationStructure>): MethodDeclaration[];
|
5536 | |
5537 |
|
5538 |
|
5539 |
|
5540 | addGetAccessor(structure: GetAccessorDeclarationStructure): GetAccessorDeclaration;
|
5541 | |
5542 |
|
5543 |
|
5544 |
|
5545 | addGetAccessors(structures: ReadonlyArray<GetAccessorDeclarationStructure>): GetAccessorDeclaration[];
|
5546 | |
5547 |
|
5548 |
|
5549 |
|
5550 |
|
5551 | insertGetAccessor(index: number, structure: GetAccessorDeclarationStructure): GetAccessorDeclaration;
|
5552 | |
5553 |
|
5554 |
|
5555 |
|
5556 |
|
5557 | insertGetAccessors(index: number, structures: ReadonlyArray<GetAccessorDeclarationStructure>): GetAccessorDeclaration[];
|
5558 | |
5559 |
|
5560 |
|
5561 |
|
5562 | addSetAccessor(structure: SetAccessorDeclarationStructure): SetAccessorDeclaration;
|
5563 | |
5564 |
|
5565 |
|
5566 |
|
5567 | addSetAccessors(structures: ReadonlyArray<SetAccessorDeclarationStructure>): SetAccessorDeclaration[];
|
5568 | |
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 | insertSetAccessor(index: number, structure: SetAccessorDeclarationStructure): SetAccessorDeclaration;
|
5574 | |
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 | insertSetAccessors(index: number, structures: ReadonlyArray<SetAccessorDeclarationStructure>): SetAccessorDeclaration[];
|
5580 | }
|
5581 |
|
5582 | declare const PropertyAssignmentBase: Constructor<InitializerGetExpressionableNode> & Constructor<QuestionTokenableNode> & Constructor<PropertyNamedNode> & typeof Node;
|
5583 |
|
5584 | export declare class PropertyAssignment extends PropertyAssignmentBase<ts.PropertyAssignment> {
|
5585 | |
5586 |
|
5587 |
|
5588 |
|
5589 |
|
5590 | removeInitializer(): ShorthandPropertyAssignment;
|
5591 | |
5592 |
|
5593 |
|
5594 |
|
5595 | setInitializer(textOrWriterFunction: string | WriterFunction): this;
|
5596 | |
5597 |
|
5598 |
|
5599 | remove(): void;
|
5600 | |
5601 |
|
5602 |
|
5603 |
|
5604 | set(structure: Partial<PropertyAssignmentStructure>): this | ShorthandPropertyAssignment;
|
5605 | |
5606 |
|
5607 |
|
5608 | getStructure(): PropertyAssignmentStructure;
|
5609 | }
|
5610 |
|
5611 | declare const ShorthandPropertyAssignmentBase: Constructor<InitializerGetExpressionableNode> & Constructor<QuestionTokenableNode> & Constructor<NamedNode> & typeof Node;
|
5612 |
|
5613 | export declare class ShorthandPropertyAssignment extends ShorthandPropertyAssignmentBase<ts.ShorthandPropertyAssignment> {
|
5614 | |
5615 |
|
5616 |
|
5617 | hasObjectAssignmentInitializer(): boolean;
|
5618 | |
5619 |
|
5620 |
|
5621 | getObjectAssignmentInitializerOrThrow(): Expression<ts.Expression>;
|
5622 | |
5623 |
|
5624 |
|
5625 | getObjectAssignmentInitializer(): Expression | undefined;
|
5626 | |
5627 |
|
5628 |
|
5629 | getEqualsTokenOrThrow(): Node<ts.Token<SyntaxKind.EqualsToken>>;
|
5630 | |
5631 |
|
5632 |
|
5633 | getEqualsToken(): Node<ts.Token<SyntaxKind.EqualsToken>> | undefined;
|
5634 | |
5635 |
|
5636 |
|
5637 |
|
5638 |
|
5639 | removeObjectAssignmentInitializer(): this;
|
5640 | |
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 | setInitializer(text: string): PropertyAssignment;
|
5647 | |
5648 |
|
5649 |
|
5650 | remove(): void;
|
5651 | |
5652 |
|
5653 |
|
5654 |
|
5655 | set(structure: Partial<ShorthandPropertyAssignmentStructure>): this;
|
5656 | |
5657 |
|
5658 |
|
5659 | getStructure(): ShorthandPropertyAssignmentStructure;
|
5660 | }
|
5661 |
|
5662 | declare const SpreadAssignmentBase: Constructor<ExpressionedNode> & typeof Node;
|
5663 |
|
5664 | export declare class SpreadAssignment extends SpreadAssignmentBase<ts.SpreadAssignment> {
|
5665 | |
5666 |
|
5667 |
|
5668 | remove(): void;
|
5669 | |
5670 |
|
5671 |
|
5672 |
|
5673 | set(structure: Partial<SpreadAssignmentStructure>): this;
|
5674 | |
5675 |
|
5676 |
|
5677 | getStructure(): SpreadAssignmentStructure;
|
5678 | }
|
5679 |
|
5680 | declare const OmittedExpressionBase: typeof Expression;
|
5681 |
|
5682 | export declare class OmittedExpression extends OmittedExpressionBase<ts.OmittedExpression> {
|
5683 | }
|
5684 |
|
5685 | declare const ParenthesizedExpressionBase: Constructor<ExpressionedNode> & typeof Expression;
|
5686 |
|
5687 | export declare class ParenthesizedExpression extends ParenthesizedExpressionBase<ts.ParenthesizedExpression> {
|
5688 | }
|
5689 |
|
5690 | declare const PartiallyEmittedExpressionBase: Constructor<ExpressionedNode> & typeof Expression;
|
5691 |
|
5692 | export declare class PartiallyEmittedExpression extends PartiallyEmittedExpressionBase<ts.PartiallyEmittedExpression> {
|
5693 | }
|
5694 |
|
5695 | declare const PostfixUnaryExpressionBase: typeof UnaryExpression;
|
5696 |
|
5697 | export declare class PostfixUnaryExpression extends PostfixUnaryExpressionBase<ts.PostfixUnaryExpression> {
|
5698 | |
5699 |
|
5700 |
|
5701 | getOperatorToken(): ts.PostfixUnaryOperator;
|
5702 | |
5703 |
|
5704 |
|
5705 | getOperand(): LeftHandSideExpression;
|
5706 | }
|
5707 |
|
5708 | declare const PrefixUnaryExpressionBase: typeof UnaryExpression;
|
5709 |
|
5710 | export declare class PrefixUnaryExpression extends PrefixUnaryExpressionBase<ts.PrefixUnaryExpression> {
|
5711 | |
5712 |
|
5713 |
|
5714 | getOperatorToken(): ts.PrefixUnaryOperator;
|
5715 | |
5716 |
|
5717 |
|
5718 | getOperand(): UnaryExpression;
|
5719 | }
|
5720 |
|
5721 | export declare class PrimaryExpression<T extends ts.PrimaryExpression = ts.PrimaryExpression> extends MemberExpression<T> {
|
5722 | }
|
5723 |
|
5724 | declare const PropertyAccessExpressionBase: Constructor<NamedNode> & Constructor<LeftHandSideExpressionedNode> & typeof MemberExpression;
|
5725 |
|
5726 | export declare class PropertyAccessExpression<T extends ts.PropertyAccessExpression = ts.PropertyAccessExpression> extends PropertyAccessExpressionBase<T> {
|
5727 | }
|
5728 |
|
5729 | declare const SpreadElementBase: Constructor<ExpressionedNode> & typeof Expression;
|
5730 |
|
5731 | export declare class SpreadElement extends SpreadElementBase<ts.SpreadElement> {
|
5732 | }
|
5733 |
|
5734 | declare const SuperElementAccessExpressionBase: Constructor<SuperExpressionedNode> & typeof ElementAccessExpression;
|
5735 |
|
5736 | export declare class SuperElementAccessExpression extends SuperElementAccessExpressionBase<ts.SuperElementAccessExpression> {
|
5737 | }
|
5738 |
|
5739 | declare const SuperExpressionBase: typeof PrimaryExpression;
|
5740 |
|
5741 | export declare class SuperExpression extends SuperExpressionBase<ts.SuperExpression> {
|
5742 | }
|
5743 |
|
5744 | declare const SuperPropertyAccessExpressionBase: Constructor<SuperExpressionedNode> & typeof PropertyAccessExpression;
|
5745 |
|
5746 | export declare class SuperPropertyAccessExpression extends SuperPropertyAccessExpressionBase<ts.SuperPropertyAccessExpression> {
|
5747 | }
|
5748 |
|
5749 | declare const ThisExpressionBase: typeof PrimaryExpression;
|
5750 |
|
5751 | export declare class ThisExpression extends ThisExpressionBase<ts.ThisExpression> {
|
5752 | }
|
5753 |
|
5754 | declare const TypeAssertionBase: Constructor<TypedNode> & Constructor<UnaryExpressionedNode> & typeof UnaryExpression;
|
5755 |
|
5756 | export declare class TypeAssertion extends TypeAssertionBase<ts.TypeAssertion> {
|
5757 | }
|
5758 |
|
5759 | declare const TypeOfExpressionBase: Constructor<UnaryExpressionedNode> & typeof UnaryExpression;
|
5760 |
|
5761 | export declare class TypeOfExpression extends TypeOfExpressionBase<ts.TypeOfExpression> {
|
5762 | }
|
5763 |
|
5764 | export declare class UnaryExpression<T extends ts.UnaryExpression = ts.UnaryExpression> extends Expression<T> {
|
5765 | }
|
5766 |
|
5767 | export declare class UpdateExpression<T extends ts.UpdateExpression = ts.UpdateExpression> extends UnaryExpression<T> {
|
5768 | }
|
5769 |
|
5770 | declare const VoidExpressionBase: Constructor<UnaryExpressionedNode> & typeof UnaryExpression;
|
5771 |
|
5772 | export declare class VoidExpression extends VoidExpressionBase<ts.VoidExpression> {
|
5773 | }
|
5774 |
|
5775 | declare const YieldExpressionBase: Constructor<GeneratorableNode> & typeof Expression;
|
5776 |
|
5777 | export declare class YieldExpression extends YieldExpressionBase<ts.YieldExpression> {
|
5778 | |
5779 |
|
5780 |
|
5781 | getExpression(): Expression | undefined;
|
5782 | |
5783 |
|
5784 |
|
5785 | getExpressionOrThrow(): Expression<ts.Expression>;
|
5786 | }
|
5787 |
|
5788 | declare const ArrowFunctionBase: Constructor<TextInsertableNode> & Constructor<BodiedNode> & Constructor<AsyncableNode> & Constructor<FunctionLikeDeclaration> & typeof Expression;
|
5789 |
|
5790 | export declare class ArrowFunction extends ArrowFunctionBase<ts.ArrowFunction> {
|
5791 | |
5792 |
|
5793 |
|
5794 | getEqualsGreaterThan(): Node<ts.Token<SyntaxKind.EqualsGreaterThanToken>>;
|
5795 | }
|
5796 |
|
5797 | declare const FunctionDeclarationBase: Constructor<ChildOrderableNode> & Constructor<UnwrappableNode> & Constructor<TextInsertableNode> & Constructor<OverloadableNode> & Constructor<BodyableNode> & Constructor<AsyncableNode> & Constructor<GeneratorableNode> & Constructor<FunctionLikeDeclaration> & Constructor<StatementedNode> & Constructor<AmbientableNode> & Constructor<NamespaceChildableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & Constructor<NameableNode> & typeof Node;
|
5798 |
|
5799 | declare const FunctionDeclarationOverloadBase: Constructor<ChildOrderableNode> & Constructor<UnwrappableNode> & Constructor<TextInsertableNode> & Constructor<AsyncableNode> & Constructor<GeneratorableNode> & Constructor<ModifierableNode> & Constructor<SignaturedDeclaration> & Constructor<StatementedNode> & Constructor<AmbientableNode> & Constructor<NamespaceChildableNode> & Constructor<JSDocableNode> & Constructor<TypeParameteredNode> & Constructor<ExportableNode> & typeof Node;
|
5800 |
|
5801 | export declare class FunctionDeclaration extends FunctionDeclarationBase<ts.FunctionDeclaration> {
|
5802 | |
5803 |
|
5804 |
|
5805 |
|
5806 | addOverload(structure: FunctionDeclarationOverloadStructure): FunctionDeclaration;
|
5807 | |
5808 |
|
5809 |
|
5810 |
|
5811 | addOverloads(structures: ReadonlyArray<FunctionDeclarationOverloadStructure>): FunctionDeclaration[];
|
5812 | |
5813 |
|
5814 |
|
5815 |
|
5816 |
|
5817 | insertOverload(index: number, structure: FunctionDeclarationOverloadStructure): FunctionDeclaration;
|
5818 | |
5819 |
|
5820 |
|
5821 |
|
5822 |
|
5823 | insertOverloads(index: number, structures: ReadonlyArray<FunctionDeclarationOverloadStructure>): FunctionDeclaration[];
|
5824 | |
5825 |
|
5826 |
|
5827 | remove(): void;
|
5828 | |
5829 |
|
5830 |
|
5831 |
|
5832 | set(structure: Partial<FunctionDeclarationStructure>): this;
|
5833 | |
5834 |
|
5835 |
|
5836 | getStructure(): FunctionDeclarationStructure | FunctionDeclarationOverloadStructure;
|
5837 | }
|
5838 |
|
5839 | declare const FunctionExpressionBase: Constructor<JSDocableNode> & Constructor<TextInsertableNode> & Constructor<BodiedNode> & Constructor<AsyncableNode> & Constructor<GeneratorableNode> & Constructor<StatementedNode> & Constructor<TypeParameteredNode> & Constructor<SignaturedDeclaration> & Constructor<ModifierableNode> & Constructor<NameableNode> & typeof PrimaryExpression;
|
5840 |
|
5841 | export declare class FunctionExpression extends FunctionExpressionBase<ts.FunctionExpression> {
|
5842 | }
|
5843 |
|
5844 | export declare function FunctionLikeDeclaration<T extends Constructor<FunctionLikeDeclarationExtensionType>>(Base: T): Constructor<FunctionLikeDeclaration> & T;
|
5845 |
|
5846 | export interface FunctionLikeDeclaration extends JSDocableNode, TypeParameteredNode, SignaturedDeclaration, StatementedNode, ModifierableNode {
|
5847 | }
|
5848 |
|
5849 | declare type FunctionLikeDeclarationExtensionType = Node<ts.FunctionLikeDeclaration>;
|
5850 |
|
5851 | export declare function OverloadableNode<T extends Constructor<OverloadableNodeExtensionType>>(Base: T): Constructor<OverloadableNode> & T;
|
5852 |
|
5853 |
|
5854 |
|
5855 |
|
5856 | export interface OverloadableNode {
|
5857 | |
5858 |
|
5859 |
|
5860 | getOverloads(): this[];
|
5861 | |
5862 |
|
5863 |
|
5864 | getImplementation(): this | undefined;
|
5865 | |
5866 |
|
5867 |
|
5868 | getImplementationOrThrow(): this;
|
5869 | |
5870 |
|
5871 |
|
5872 | isOverload(): boolean;
|
5873 | |
5874 |
|
5875 |
|
5876 | isImplementation(): boolean;
|
5877 | }
|
5878 |
|
5879 | declare type OverloadableNodeExtensionType = Node & BodyableNode;
|
5880 |
|
5881 | declare const ParameterDeclarationBase: Constructor<QuestionTokenableNode> & Constructor<DecoratableNode> & Constructor<ScopeableNode> & Constructor<ReadonlyableNode> & Constructor<ModifierableNode> & Constructor<TypedNode> & Constructor<InitializerExpressionableNode> & Constructor<DeclarationNamedNode> & typeof Node;
|
5882 |
|
5883 | export declare class ParameterDeclaration extends ParameterDeclarationBase<ts.ParameterDeclaration> {
|
5884 | |
5885 |
|
5886 |
|
5887 | getDotDotDotToken(): Node<ts.Token<SyntaxKind.DotDotDotToken>> | undefined;
|
5888 | |
5889 |
|
5890 |
|
5891 | isRestParameter(): boolean;
|
5892 | |
5893 |
|
5894 |
|
5895 | isParameterProperty(): boolean;
|
5896 | |
5897 |
|
5898 |
|
5899 |
|
5900 | setIsRestParameter(value: boolean): this;
|
5901 | |
5902 |
|
5903 |
|
5904 | isOptional(): boolean;
|
5905 | |
5906 |
|
5907 |
|
5908 | remove(): void;
|
5909 | |
5910 |
|
5911 |
|
5912 |
|
5913 | set(structure: Partial<ParameterDeclarationStructure>): this;
|
5914 | |
5915 |
|
5916 |
|
5917 | getStructure(): ParameterDeclarationStructure;
|
5918 | |
5919 |
|
5920 |
|
5921 |
|
5922 | setHasQuestionToken(value: boolean): this;
|
5923 | |
5924 |
|
5925 |
|
5926 |
|
5927 | setInitializer(textOrWriterFunction: string | WriterFunction): this;
|
5928 | |
5929 |
|
5930 |
|
5931 |
|
5932 | setType(textOrWriterFunction: string | WriterFunction): this;
|
5933 | }
|
5934 |
|
5935 | export declare class HeritageClause extends Node<ts.HeritageClause> {
|
5936 | |
5937 |
|
5938 |
|
5939 | getTypeNodes(): ExpressionWithTypeArguments[];
|
5940 | |
5941 |
|
5942 |
|
5943 | getToken(): SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
|
5944 | |
5945 |
|
5946 |
|
5947 |
|
5948 | removeExpression(index: number): this;
|
5949 | |
5950 |
|
5951 |
|
5952 |
|
5953 | removeExpression(expressionNode: ExpressionWithTypeArguments): this;
|
5954 | }
|
5955 |
|
5956 | declare const CallSignatureDeclarationBase: Constructor<TypeParameteredNode> & Constructor<ChildOrderableNode> & Constructor<JSDocableNode> & Constructor<SignaturedDeclaration> & typeof TypeElement;
|
5957 |
|
5958 | export declare class CallSignatureDeclaration extends CallSignatureDeclarationBase<ts.CallSignatureDeclaration> {
|
5959 | |
5960 |
|
5961 |
|
5962 |
|
5963 | set(structure: Partial<CallSignatureDeclarationStructure>): this;
|
5964 | |
5965 |
|
5966 |
|
5967 | remove(): void;
|
5968 | |
5969 |
|
5970 |
|
5971 | getStructure(): CallSignatureDeclarationStructure;
|
5972 | }
|
5973 |
|
5974 | declare const ConstructSignatureDeclarationBase: Constructor<TypeParameteredNode> & Constructor<ChildOrderableNode> & Constructor<JSDocableNode> & Constructor<SignaturedDeclaration> & typeof TypeElement;
|
5975 |
|
5976 | export declare class ConstructSignatureDeclaration extends ConstructSignatureDeclarationBase<ts.ConstructSignatureDeclaration> {
|
5977 | |
5978 |
|
5979 |
|
5980 |
|
5981 | set(structure: Partial<ConstructSignatureDeclarationStructure>): this;
|
5982 | |
5983 |
|
5984 |
|
5985 | remove(): void;
|
5986 | |
5987 |
|
5988 |
|
5989 | getStructure(): ConstructSignatureDeclarationStructure;
|
5990 | }
|
5991 |
|
5992 | declare const IndexSignatureDeclarationBase: Constructor<ReturnTypedNode> & Constructor<ChildOrderableNode> & Constructor<JSDocableNode> & Constructor<ReadonlyableNode> & Constructor<ModifierableNode> & typeof TypeElement;
|
5993 |
|
5994 | export declare class IndexSignatureDeclaration extends IndexSignatureDeclarationBase<ts.IndexSignatureDeclaration> {
|
5995 | |
5996 |
|
5997 |
|
5998 | getKeyName(): string;
|
5999 | |
6000 |
|
6001 |
|
6002 |
|
6003 | setKeyName(name: string): void;
|
6004 | |
6005 |
|
6006 |
|
6007 | getKeyNameNode(): BindingName;
|
6008 | |
6009 |
|
6010 |
|
6011 | getKeyType(): Type;
|
6012 | |
6013 |
|
6014 |
|
6015 |
|
6016 | setKeyType(type: string): this;
|
6017 | |
6018 |
|
6019 |
|
6020 | getKeyTypeNode(): TypeNode;
|
6021 | |
6022 |
|
6023 |
|
6024 | remove(): void;
|
6025 | |
6026 |
|
6027 |
|
6028 |
|
6029 | set(structure: Partial<IndexSignatureDeclarationStructure>): this;
|
6030 | |
6031 |
|
6032 |
|
6033 | getStructure(): IndexSignatureDeclarationStructure;
|
6034 | }
|
6035 |
|
6036 | declare const InterfaceDeclarationBase: Constructor<TypeElementMemberedNode> & Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<ExtendsClauseableNode> & Constructor<HeritageClauseableNode> & Constructor<TypeParameteredNode> & Constructor<JSDocableNode> & Constructor<AmbientableNode> & Constructor<NamespaceChildableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & Constructor<NamedNode> & typeof Statement;
|
6037 |
|
6038 | export declare class InterfaceDeclaration extends InterfaceDeclarationBase<ts.InterfaceDeclaration> {
|
6039 | |
6040 |
|
6041 |
|
6042 | getBaseTypes(): Type[];
|
6043 | |
6044 |
|
6045 |
|
6046 | getBaseDeclarations(): (TypeAliasDeclaration | InterfaceDeclaration | ClassDeclaration)[];
|
6047 | |
6048 |
|
6049 |
|
6050 |
|
6051 |
|
6052 | getImplementations(): ImplementationLocation[];
|
6053 | |
6054 |
|
6055 |
|
6056 |
|
6057 | set(structure: Partial<InterfaceDeclarationStructure>): this;
|
6058 | |
6059 |
|
6060 |
|
6061 | getStructure(): InterfaceDeclarationStructure;
|
6062 | }
|
6063 |
|
6064 | declare const MethodSignatureBase: Constructor<ChildOrderableNode> & Constructor<JSDocableNode> & Constructor<QuestionTokenableNode> & Constructor<TypeParameteredNode> & Constructor<SignaturedDeclaration> & Constructor<PropertyNamedNode> & typeof TypeElement;
|
6065 |
|
6066 | export declare class MethodSignature extends MethodSignatureBase<ts.MethodSignature> {
|
6067 | |
6068 |
|
6069 |
|
6070 | remove(): void;
|
6071 | |
6072 |
|
6073 |
|
6074 |
|
6075 | set(structure: Partial<MethodSignatureStructure>): this;
|
6076 | |
6077 |
|
6078 |
|
6079 | getStructure(): MethodSignatureStructure;
|
6080 | }
|
6081 |
|
6082 | declare const PropertySignatureBase: Constructor<ChildOrderableNode> & Constructor<JSDocableNode> & Constructor<ReadonlyableNode> & Constructor<QuestionTokenableNode> & Constructor<InitializerExpressionableNode> & Constructor<TypedNode> & Constructor<PropertyNamedNode> & Constructor<ModifierableNode> & typeof TypeElement;
|
6083 |
|
6084 | export declare class PropertySignature extends PropertySignatureBase<ts.PropertySignature> {
|
6085 | |
6086 |
|
6087 |
|
6088 | remove(): void;
|
6089 | |
6090 |
|
6091 |
|
6092 |
|
6093 | set(structure: Partial<PropertySignatureStructure>): this;
|
6094 | |
6095 |
|
6096 |
|
6097 | getStructure(): PropertySignatureStructure;
|
6098 | }
|
6099 |
|
6100 | export declare class TypeElement<TNode extends ts.TypeElement = ts.TypeElement> extends Node<TNode> {
|
6101 | }
|
6102 |
|
6103 | export declare function JsxAttributedNode<T extends Constructor<JsxAttributedNodeExtensionType>>(Base: T): Constructor<JsxAttributedNode> & T;
|
6104 |
|
6105 | export interface JsxAttributedNode {
|
6106 | |
6107 |
|
6108 |
|
6109 | getAttributes(): JsxAttributeLike[];
|
6110 | |
6111 |
|
6112 |
|
6113 |
|
6114 | getAttribute(name: string): JsxAttributeLike | undefined;
|
6115 | |
6116 |
|
6117 |
|
6118 |
|
6119 | getAttribute(findFunction: (attribute: JsxAttributeLike) => boolean): JsxAttributeLike | undefined;
|
6120 | |
6121 |
|
6122 |
|
6123 |
|
6124 | getAttributeOrThrow(name: string): JsxAttributeLike;
|
6125 | |
6126 |
|
6127 |
|
6128 |
|
6129 | getAttributeOrThrow(findFunction: (attribute: JsxAttributeLike) => boolean): JsxAttributeLike;
|
6130 | |
6131 |
|
6132 |
|
6133 | addAttribute(attribute: JsxAttributeStructure | JsxSpreadAttributeStructure): JsxAttributeLike;
|
6134 | |
6135 |
|
6136 |
|
6137 | addAttributes(attributes: ReadonlyArray<JsxAttributeStructure | JsxSpreadAttributeStructure>): JsxAttributeLike[];
|
6138 | |
6139 |
|
6140 |
|
6141 | insertAttribute(index: number, attribute: JsxAttributeStructure | JsxSpreadAttributeStructure): JsxAttributeLike;
|
6142 | |
6143 |
|
6144 |
|
6145 | insertAttributes(index: number, attributes: ReadonlyArray<JsxAttributeStructure | JsxSpreadAttributeStructure>): JsxAttributeLike[];
|
6146 | }
|
6147 |
|
6148 | declare type JsxAttributedNodeExtensionType = Node<ts.Node & {
|
6149 | attributes: ts.JsxAttributes;
|
6150 | }> & JsxTagNamedNode;
|
6151 |
|
6152 | export declare function JsxTagNamedNode<T extends Constructor<JsxTagNamedNodeExtensionType>>(Base: T): Constructor<JsxTagNamedNode> & T;
|
6153 |
|
6154 | export interface JsxTagNamedNode {
|
6155 | |
6156 |
|
6157 |
|
6158 | getTagNameNode(): JsxTagNameExpression;
|
6159 | }
|
6160 |
|
6161 | declare type JsxTagNamedNodeExtensionType = Node<ts.Node & {
|
6162 | tagName: ts.JsxTagNameExpression;
|
6163 | }>;
|
6164 |
|
6165 | declare const JsxAttributeBase: Constructor<NamedNode> & typeof Node;
|
6166 |
|
6167 | export declare class JsxAttribute extends JsxAttributeBase<ts.JsxAttribute> {
|
6168 | |
6169 |
|
6170 |
|
6171 | getInitializerOrThrow(): StringLiteral | JsxExpression;
|
6172 | |
6173 |
|
6174 |
|
6175 | getInitializer(): StringLiteral | JsxExpression | undefined;
|
6176 | |
6177 |
|
6178 |
|
6179 |
|
6180 |
|
6181 | setInitializer(textOrWriterFunction: string | WriterFunction): this;
|
6182 | |
6183 |
|
6184 |
|
6185 | removeInitializer(): this;
|
6186 | |
6187 |
|
6188 |
|
6189 | remove(): void;
|
6190 | |
6191 |
|
6192 |
|
6193 |
|
6194 | set(structure: Partial<JsxAttributeStructure>): this;
|
6195 | |
6196 |
|
6197 |
|
6198 | getStructure(): JsxAttributeStructure;
|
6199 | }
|
6200 |
|
6201 | declare const JsxClosingElementBase: Constructor<JsxTagNamedNode> & typeof Node;
|
6202 |
|
6203 | export declare class JsxClosingElement extends JsxClosingElementBase<ts.JsxClosingElement> {
|
6204 | }
|
6205 |
|
6206 | export declare class JsxClosingFragment extends Expression<ts.JsxClosingFragment> {
|
6207 | }
|
6208 |
|
6209 | declare const JsxElementBase: typeof PrimaryExpression;
|
6210 |
|
6211 | export declare class JsxElement extends JsxElementBase<ts.JsxElement> {
|
6212 | |
6213 |
|
6214 |
|
6215 | getJsxChildren(): JsxChild[];
|
6216 | |
6217 |
|
6218 |
|
6219 | getOpeningElement(): JsxOpeningElement;
|
6220 | |
6221 |
|
6222 |
|
6223 | getClosingElement(): JsxClosingElement;
|
6224 | |
6225 |
|
6226 |
|
6227 |
|
6228 | setBodyText(textOrWriterFunction: string | WriterFunction): this;
|
6229 | |
6230 |
|
6231 |
|
6232 |
|
6233 | setBodyTextInline(textOrWriterFunction: string | WriterFunction): this;
|
6234 | |
6235 |
|
6236 |
|
6237 |
|
6238 | set(structure: Partial<JsxElementStructure>): this;
|
6239 | |
6240 |
|
6241 |
|
6242 | getStructure(): JsxElementStructure;
|
6243 | }
|
6244 |
|
6245 | export declare class JsxExpression extends Expression<ts.JsxExpression> {
|
6246 | |
6247 |
|
6248 |
|
6249 | getDotDotDotTokenOrThrow(): Node<ts.Token<SyntaxKind.DotDotDotToken>>;
|
6250 | |
6251 |
|
6252 |
|
6253 | getDotDotDotToken(): Node<ts.Token<SyntaxKind.DotDotDotToken>> | undefined;
|
6254 | |
6255 |
|
6256 |
|
6257 | getExpressionOrThrow(): Expression<ts.Expression>;
|
6258 | |
6259 |
|
6260 |
|
6261 | getExpression(): Expression | undefined;
|
6262 | }
|
6263 |
|
6264 | export declare class JsxFragment extends PrimaryExpression<ts.JsxFragment> {
|
6265 | |
6266 |
|
6267 |
|
6268 | getJsxChildren(): JsxChild[];
|
6269 | |
6270 |
|
6271 |
|
6272 | getOpeningFragment(): JsxOpeningFragment;
|
6273 | |
6274 |
|
6275 |
|
6276 | getClosingFragment(): JsxClosingFragment;
|
6277 | }
|
6278 |
|
6279 | declare const JsxOpeningElementBase: Constructor<JsxAttributedNode> & Constructor<JsxTagNamedNode> & typeof Expression;
|
6280 |
|
6281 | export declare class JsxOpeningElement extends JsxOpeningElementBase<ts.JsxOpeningElement> {
|
6282 | }
|
6283 |
|
6284 | export declare class JsxOpeningFragment extends Expression<ts.JsxOpeningFragment> {
|
6285 | }
|
6286 |
|
6287 | declare const JsxSelfClosingElementBase: Constructor<JsxAttributedNode> & Constructor<JsxTagNamedNode> & typeof PrimaryExpression;
|
6288 |
|
6289 | export declare class JsxSelfClosingElement extends JsxSelfClosingElementBase<ts.JsxSelfClosingElement> {
|
6290 | |
6291 |
|
6292 |
|
6293 |
|
6294 | set(structure: Partial<JsxElementStructure>): this;
|
6295 | |
6296 |
|
6297 |
|
6298 | getStructure(): JsxElementStructure;
|
6299 | }
|
6300 |
|
6301 | declare const JsxSpreadAttributeBase: typeof Node;
|
6302 |
|
6303 | export declare class JsxSpreadAttribute extends JsxSpreadAttributeBase<ts.JsxSpreadAttribute> {
|
6304 | |
6305 |
|
6306 |
|
6307 | getExpression(): Expression<ts.Expression>;
|
6308 | |
6309 |
|
6310 |
|
6311 |
|
6312 | setExpression(textOrWriterFunction: string | WriterFunction): this;
|
6313 | |
6314 |
|
6315 |
|
6316 | remove(): void;
|
6317 | |
6318 |
|
6319 |
|
6320 |
|
6321 | set(structure: Partial<JsxSpreadAttributeStructure>): this;
|
6322 | |
6323 |
|
6324 |
|
6325 | getStructure(): JsxSpreadAttributeStructure;
|
6326 | }
|
6327 |
|
6328 | export declare class JsxText extends Node<ts.JsxText> {
|
6329 | |
6330 |
|
6331 |
|
6332 | containsOnlyWhiteSpaces(): boolean;
|
6333 | }
|
6334 |
|
6335 | export interface ImplementedKindToNodeMappings {
|
6336 | [SyntaxKind.SourceFile]: SourceFile;
|
6337 | [SyntaxKind.ArrayBindingPattern]: ArrayBindingPattern;
|
6338 | [SyntaxKind.ArrayLiteralExpression]: ArrayLiteralExpression;
|
6339 | [SyntaxKind.ArrayType]: ArrayTypeNode;
|
6340 | [SyntaxKind.ArrowFunction]: ArrowFunction;
|
6341 | [SyntaxKind.AsExpression]: AsExpression;
|
6342 | [SyntaxKind.AwaitExpression]: AwaitExpression;
|
6343 | [SyntaxKind.BindingElement]: BindingElement;
|
6344 | [SyntaxKind.BinaryExpression]: BinaryExpression;
|
6345 | [SyntaxKind.Block]: Block;
|
6346 | [SyntaxKind.BreakStatement]: BreakStatement;
|
6347 | [SyntaxKind.CallExpression]: CallExpression;
|
6348 | [SyntaxKind.CallSignature]: CallSignatureDeclaration;
|
6349 | [SyntaxKind.CaseBlock]: CaseBlock;
|
6350 | [SyntaxKind.CaseClause]: CaseClause;
|
6351 | [SyntaxKind.CatchClause]: CatchClause;
|
6352 | [SyntaxKind.ClassDeclaration]: ClassDeclaration;
|
6353 | [SyntaxKind.ClassExpression]: ClassExpression;
|
6354 | [SyntaxKind.Constructor]: ConstructorDeclaration;
|
6355 | [SyntaxKind.ConstructorType]: ConstructorTypeNode;
|
6356 | [SyntaxKind.ConstructSignature]: ConstructSignatureDeclaration;
|
6357 | [SyntaxKind.ContinueStatement]: ContinueStatement;
|
6358 | [SyntaxKind.CommaListExpression]: CommaListExpression;
|
6359 | [SyntaxKind.ComputedPropertyName]: ComputedPropertyName;
|
6360 | [SyntaxKind.ConditionalExpression]: ConditionalExpression;
|
6361 | [SyntaxKind.DebuggerStatement]: DebuggerStatement;
|
6362 | [SyntaxKind.Decorator]: Decorator;
|
6363 | [SyntaxKind.DefaultClause]: DefaultClause;
|
6364 | [SyntaxKind.DeleteExpression]: DeleteExpression;
|
6365 | [SyntaxKind.DoStatement]: DoStatement;
|
6366 | [SyntaxKind.ElementAccessExpression]: ElementAccessExpression;
|
6367 | [SyntaxKind.EmptyStatement]: EmptyStatement;
|
6368 | [SyntaxKind.EnumDeclaration]: EnumDeclaration;
|
6369 | [SyntaxKind.EnumMember]: EnumMember;
|
6370 | [SyntaxKind.ExportAssignment]: ExportAssignment;
|
6371 | [SyntaxKind.ExportDeclaration]: ExportDeclaration;
|
6372 | [SyntaxKind.ExportSpecifier]: ExportSpecifier;
|
6373 | [SyntaxKind.ExpressionWithTypeArguments]: ExpressionWithTypeArguments;
|
6374 | [SyntaxKind.ExpressionStatement]: ExpressionStatement;
|
6375 | [SyntaxKind.ExternalModuleReference]: ExternalModuleReference;
|
6376 | [SyntaxKind.QualifiedName]: QualifiedName;
|
6377 | [SyntaxKind.FirstNode]: QualifiedName;
|
6378 | [SyntaxKind.ForInStatement]: ForInStatement;
|
6379 | [SyntaxKind.ForOfStatement]: ForOfStatement;
|
6380 | [SyntaxKind.ForStatement]: ForStatement;
|
6381 | [SyntaxKind.FunctionDeclaration]: FunctionDeclaration;
|
6382 | [SyntaxKind.FunctionExpression]: FunctionExpression;
|
6383 | [SyntaxKind.FunctionType]: FunctionTypeNode;
|
6384 | [SyntaxKind.GetAccessor]: GetAccessorDeclaration;
|
6385 | [SyntaxKind.HeritageClause]: HeritageClause;
|
6386 | [SyntaxKind.Identifier]: Identifier;
|
6387 | [SyntaxKind.IfStatement]: IfStatement;
|
6388 | [SyntaxKind.ImportClause]: ImportClause;
|
6389 | [SyntaxKind.ImportDeclaration]: ImportDeclaration;
|
6390 | [SyntaxKind.ImportEqualsDeclaration]: ImportEqualsDeclaration;
|
6391 | [SyntaxKind.ImportSpecifier]: ImportSpecifier;
|
6392 | [SyntaxKind.ImportType]: ImportTypeNode;
|
6393 | [SyntaxKind.LastTypeNode]: ImportTypeNode;
|
6394 | [SyntaxKind.IndexSignature]: IndexSignatureDeclaration;
|
6395 | [SyntaxKind.InterfaceDeclaration]: InterfaceDeclaration;
|
6396 | [SyntaxKind.IntersectionType]: IntersectionTypeNode;
|
6397 | [SyntaxKind.JSDocTag]: JSDocUnknownTag;
|
6398 | [SyntaxKind.FirstJSDocTagNode]: JSDocUnknownTag;
|
6399 | [SyntaxKind.JSDocAugmentsTag]: JSDocAugmentsTag;
|
6400 | [SyntaxKind.JSDocClassTag]: JSDocClassTag;
|
6401 | [SyntaxKind.JSDocReturnTag]: JSDocReturnTag;
|
6402 | [SyntaxKind.JSDocTypeTag]: JSDocTypeTag;
|
6403 | [SyntaxKind.JSDocTypedefTag]: JSDocTypedefTag;
|
6404 | [SyntaxKind.JSDocParameterTag]: JSDocParameterTag;
|
6405 | [SyntaxKind.JSDocPropertyTag]: JSDocPropertyTag;
|
6406 | [SyntaxKind.LastJSDocNode]: JSDocPropertyTag;
|
6407 | [SyntaxKind.LastJSDocTagNode]: JSDocPropertyTag;
|
6408 | [SyntaxKind.JsxAttribute]: JsxAttribute;
|
6409 | [SyntaxKind.JsxClosingElement]: JsxClosingElement;
|
6410 | [SyntaxKind.JsxClosingFragment]: JsxClosingFragment;
|
6411 | [SyntaxKind.JsxElement]: JsxElement;
|
6412 | [SyntaxKind.JsxExpression]: JsxExpression;
|
6413 | [SyntaxKind.JsxFragment]: JsxFragment;
|
6414 | [SyntaxKind.JsxOpeningElement]: JsxOpeningElement;
|
6415 | [SyntaxKind.JsxOpeningFragment]: JsxOpeningFragment;
|
6416 | [SyntaxKind.JsxSelfClosingElement]: JsxSelfClosingElement;
|
6417 | [SyntaxKind.JsxSpreadAttribute]: JsxSpreadAttribute;
|
6418 | [SyntaxKind.JsxText]: JsxText;
|
6419 | [SyntaxKind.LabeledStatement]: LabeledStatement;
|
6420 | [SyntaxKind.LiteralType]: LiteralTypeNode;
|
6421 | [SyntaxKind.MetaProperty]: MetaProperty;
|
6422 | [SyntaxKind.MethodDeclaration]: MethodDeclaration;
|
6423 | [SyntaxKind.MethodSignature]: MethodSignature;
|
6424 | [SyntaxKind.ModuleBlock]: ModuleBlock;
|
6425 | [SyntaxKind.ModuleDeclaration]: NamespaceDeclaration;
|
6426 | [SyntaxKind.NamedExports]: NamedExports;
|
6427 | [SyntaxKind.NamedImports]: NamedImports;
|
6428 | [SyntaxKind.NamespaceImport]: NamespaceImport;
|
6429 | [SyntaxKind.NewExpression]: NewExpression;
|
6430 | [SyntaxKind.NonNullExpression]: NonNullExpression;
|
6431 | [SyntaxKind.NotEmittedStatement]: NotEmittedStatement;
|
6432 | [SyntaxKind.NoSubstitutionTemplateLiteral]: NoSubstitutionTemplateLiteral;
|
6433 | [SyntaxKind.LastLiteralToken]: NoSubstitutionTemplateLiteral;
|
6434 | [SyntaxKind.FirstTemplateToken]: NoSubstitutionTemplateLiteral;
|
6435 | [SyntaxKind.NumericLiteral]: NumericLiteral;
|
6436 | [SyntaxKind.FirstLiteralToken]: NumericLiteral;
|
6437 | [SyntaxKind.ObjectBindingPattern]: ObjectBindingPattern;
|
6438 | [SyntaxKind.ObjectLiteralExpression]: ObjectLiteralExpression;
|
6439 | [SyntaxKind.OmittedExpression]: OmittedExpression;
|
6440 | [SyntaxKind.Parameter]: ParameterDeclaration;
|
6441 | [SyntaxKind.ParenthesizedExpression]: ParenthesizedExpression;
|
6442 | [SyntaxKind.ParenthesizedType]: ParenthesizedTypeNode;
|
6443 | [SyntaxKind.PartiallyEmittedExpression]: PartiallyEmittedExpression;
|
6444 | [SyntaxKind.PostfixUnaryExpression]: PostfixUnaryExpression;
|
6445 | [SyntaxKind.PrefixUnaryExpression]: PrefixUnaryExpression;
|
6446 | [SyntaxKind.PropertyAccessExpression]: PropertyAccessExpression;
|
6447 | [SyntaxKind.PropertyAssignment]: PropertyAssignment;
|
6448 | [SyntaxKind.PropertyDeclaration]: PropertyDeclaration;
|
6449 | [SyntaxKind.PropertySignature]: PropertySignature;
|
6450 | [SyntaxKind.RegularExpressionLiteral]: RegularExpressionLiteral;
|
6451 | [SyntaxKind.ReturnStatement]: ReturnStatement;
|
6452 | [SyntaxKind.SetAccessor]: SetAccessorDeclaration;
|
6453 | [SyntaxKind.ShorthandPropertyAssignment]: ShorthandPropertyAssignment;
|
6454 | [SyntaxKind.SpreadAssignment]: SpreadAssignment;
|
6455 | [SyntaxKind.SpreadElement]: SpreadElement;
|
6456 | [SyntaxKind.StringLiteral]: StringLiteral;
|
6457 | [SyntaxKind.SwitchStatement]: SwitchStatement;
|
6458 | [SyntaxKind.SyntaxList]: SyntaxList;
|
6459 | [SyntaxKind.TaggedTemplateExpression]: TaggedTemplateExpression;
|
6460 | [SyntaxKind.TemplateExpression]: TemplateExpression;
|
6461 | [SyntaxKind.TemplateHead]: TemplateHead;
|
6462 | [SyntaxKind.TemplateMiddle]: TemplateMiddle;
|
6463 | [SyntaxKind.TemplateSpan]: TemplateSpan;
|
6464 | [SyntaxKind.TemplateTail]: TemplateTail;
|
6465 | [SyntaxKind.LastTemplateToken]: TemplateTail;
|
6466 | [SyntaxKind.ThrowStatement]: ThrowStatement;
|
6467 | [SyntaxKind.TryStatement]: TryStatement;
|
6468 | [SyntaxKind.TupleType]: TupleTypeNode;
|
6469 | [SyntaxKind.TypeAliasDeclaration]: TypeAliasDeclaration;
|
6470 | [SyntaxKind.TypeAssertionExpression]: TypeAssertion;
|
6471 | [SyntaxKind.TypeLiteral]: TypeLiteralNode;
|
6472 | [SyntaxKind.TypeParameter]: TypeParameterDeclaration;
|
6473 | [SyntaxKind.TypeReference]: TypeReferenceNode;
|
6474 | [SyntaxKind.UnionType]: UnionTypeNode;
|
6475 | [SyntaxKind.VariableDeclaration]: VariableDeclaration;
|
6476 | [SyntaxKind.VariableDeclarationList]: VariableDeclarationList;
|
6477 | [SyntaxKind.VariableStatement]: VariableStatement;
|
6478 | [SyntaxKind.JSDocComment]: JSDoc;
|
6479 | [SyntaxKind.TypePredicate]: TypeNode;
|
6480 | [SyntaxKind.FirstTypeNode]: TypeNode;
|
6481 | [SyntaxKind.SemicolonToken]: Node;
|
6482 | [SyntaxKind.TypeOfExpression]: TypeOfExpression;
|
6483 | [SyntaxKind.WhileStatement]: WhileStatement;
|
6484 | [SyntaxKind.WithStatement]: WithStatement;
|
6485 | [SyntaxKind.YieldExpression]: YieldExpression;
|
6486 | [SyntaxKind.AnyKeyword]: Expression;
|
6487 | [SyntaxKind.BooleanKeyword]: Expression;
|
6488 | [SyntaxKind.NeverKeyword]: Expression;
|
6489 | [SyntaxKind.NumberKeyword]: Expression;
|
6490 | [SyntaxKind.ObjectKeyword]: Expression;
|
6491 | [SyntaxKind.StringKeyword]: Expression;
|
6492 | [SyntaxKind.SymbolKeyword]: Expression;
|
6493 | [SyntaxKind.UndefinedKeyword]: Expression;
|
6494 | [SyntaxKind.FalseKeyword]: BooleanLiteral;
|
6495 | [SyntaxKind.TrueKeyword]: BooleanLiteral;
|
6496 | [SyntaxKind.ImportKeyword]: ImportExpression;
|
6497 | [SyntaxKind.NullKeyword]: NullLiteral;
|
6498 | [SyntaxKind.SuperKeyword]: SuperExpression;
|
6499 | [SyntaxKind.ThisKeyword]: ThisExpression;
|
6500 | [SyntaxKind.VoidExpression]: VoidExpression;
|
6501 | }
|
6502 |
|
6503 | export interface KindToNodeMappings extends ImplementedKindToNodeMappings {
|
6504 | [kind: number]: Node;
|
6505 | }
|
6506 |
|
6507 | export interface KindToExpressionMappings {
|
6508 | [kind: number]: Node;
|
6509 | [SyntaxKind.ArrayLiteralExpression]: ArrayLiteralExpression;
|
6510 | [SyntaxKind.ArrowFunction]: ArrowFunction;
|
6511 | [SyntaxKind.AsExpression]: AsExpression;
|
6512 | [SyntaxKind.AwaitExpression]: AwaitExpression;
|
6513 | [SyntaxKind.BinaryExpression]: BinaryExpression;
|
6514 | [SyntaxKind.CallExpression]: CallExpression;
|
6515 | [SyntaxKind.ClassExpression]: ClassExpression;
|
6516 | [SyntaxKind.CommaListExpression]: CommaListExpression;
|
6517 | [SyntaxKind.ConditionalExpression]: ConditionalExpression;
|
6518 | [SyntaxKind.DeleteExpression]: DeleteExpression;
|
6519 | [SyntaxKind.ElementAccessExpression]: ElementAccessExpression;
|
6520 | [SyntaxKind.FunctionExpression]: FunctionExpression;
|
6521 | [SyntaxKind.Identifier]: Identifier;
|
6522 | [SyntaxKind.JsxClosingFragment]: JsxClosingFragment;
|
6523 | [SyntaxKind.JsxElement]: JsxElement;
|
6524 | [SyntaxKind.JsxExpression]: JsxExpression;
|
6525 | [SyntaxKind.JsxFragment]: JsxFragment;
|
6526 | [SyntaxKind.JsxOpeningElement]: JsxOpeningElement;
|
6527 | [SyntaxKind.JsxOpeningFragment]: JsxOpeningFragment;
|
6528 | [SyntaxKind.JsxSelfClosingElement]: JsxSelfClosingElement;
|
6529 | [SyntaxKind.MetaProperty]: MetaProperty;
|
6530 | [SyntaxKind.NewExpression]: NewExpression;
|
6531 | [SyntaxKind.NonNullExpression]: NonNullExpression;
|
6532 | [SyntaxKind.NoSubstitutionTemplateLiteral]: NoSubstitutionTemplateLiteral;
|
6533 | [SyntaxKind.LastLiteralToken]: NoSubstitutionTemplateLiteral;
|
6534 | [SyntaxKind.FirstTemplateToken]: NoSubstitutionTemplateLiteral;
|
6535 | [SyntaxKind.NumericLiteral]: NumericLiteral;
|
6536 | [SyntaxKind.FirstLiteralToken]: NumericLiteral;
|
6537 | [SyntaxKind.ObjectLiteralExpression]: ObjectLiteralExpression;
|
6538 | [SyntaxKind.OmittedExpression]: OmittedExpression;
|
6539 | [SyntaxKind.ParenthesizedExpression]: ParenthesizedExpression;
|
6540 | [SyntaxKind.PartiallyEmittedExpression]: PartiallyEmittedExpression;
|
6541 | [SyntaxKind.PostfixUnaryExpression]: PostfixUnaryExpression;
|
6542 | [SyntaxKind.PrefixUnaryExpression]: PrefixUnaryExpression;
|
6543 | [SyntaxKind.PropertyAccessExpression]: PropertyAccessExpression;
|
6544 | [SyntaxKind.RegularExpressionLiteral]: RegularExpressionLiteral;
|
6545 | [SyntaxKind.SpreadElement]: SpreadElement;
|
6546 | [SyntaxKind.StringLiteral]: StringLiteral;
|
6547 | [SyntaxKind.TaggedTemplateExpression]: TaggedTemplateExpression;
|
6548 | [SyntaxKind.TemplateExpression]: TemplateExpression;
|
6549 | [SyntaxKind.TypeAssertionExpression]: TypeAssertion;
|
6550 | [SyntaxKind.TypeOfExpression]: TypeOfExpression;
|
6551 | [SyntaxKind.YieldExpression]: YieldExpression;
|
6552 | [SyntaxKind.AnyKeyword]: Expression;
|
6553 | [SyntaxKind.BooleanKeyword]: Expression;
|
6554 | [SyntaxKind.NeverKeyword]: Expression;
|
6555 | [SyntaxKind.NumberKeyword]: Expression;
|
6556 | [SyntaxKind.ObjectKeyword]: Expression;
|
6557 | [SyntaxKind.StringKeyword]: Expression;
|
6558 | [SyntaxKind.SymbolKeyword]: Expression;
|
6559 | [SyntaxKind.UndefinedKeyword]: Expression;
|
6560 | [SyntaxKind.FalseKeyword]: BooleanLiteral;
|
6561 | [SyntaxKind.TrueKeyword]: BooleanLiteral;
|
6562 | [SyntaxKind.ImportKeyword]: ImportExpression;
|
6563 | [SyntaxKind.NullKeyword]: NullLiteral;
|
6564 | [SyntaxKind.SuperKeyword]: SuperExpression;
|
6565 | [SyntaxKind.ThisKeyword]: ThisExpression;
|
6566 | [SyntaxKind.VoidExpression]: VoidExpression;
|
6567 | }
|
6568 |
|
6569 | declare const BooleanLiteralBase: typeof PrimaryExpression;
|
6570 |
|
6571 | export declare class BooleanLiteral extends BooleanLiteralBase<ts.BooleanLiteral> {
|
6572 | |
6573 |
|
6574 |
|
6575 | getLiteralValue(): boolean;
|
6576 | |
6577 |
|
6578 |
|
6579 |
|
6580 |
|
6581 |
|
6582 | setLiteralValue(value: boolean): BooleanLiteral;
|
6583 | }
|
6584 |
|
6585 | declare const NullLiteralBase: typeof PrimaryExpression;
|
6586 |
|
6587 | export declare class NullLiteral extends NullLiteralBase<ts.NullLiteral> {
|
6588 | }
|
6589 |
|
6590 | declare const NumericLiteralBase: typeof LiteralExpression;
|
6591 |
|
6592 | export declare class NumericLiteral extends NumericLiteralBase<ts.NumericLiteral> {
|
6593 | |
6594 |
|
6595 |
|
6596 | getLiteralValue(): number;
|
6597 | |
6598 |
|
6599 |
|
6600 |
|
6601 | setLiteralValue(value: number): this;
|
6602 | }
|
6603 |
|
6604 | export declare enum QuoteKind {
|
6605 |
|
6606 | Single = "'",
|
6607 |
|
6608 | Double = "\""
|
6609 | }
|
6610 |
|
6611 | declare const RegularExpressionLiteralBase: typeof LiteralExpression;
|
6612 |
|
6613 | export declare class RegularExpressionLiteral extends RegularExpressionLiteralBase<ts.RegularExpressionLiteral> {
|
6614 | |
6615 |
|
6616 |
|
6617 | getLiteralValue(): RegExp;
|
6618 | |
6619 |
|
6620 |
|
6621 |
|
6622 |
|
6623 | setLiteralValue(pattern: string, flags?: string): this;
|
6624 | |
6625 |
|
6626 |
|
6627 |
|
6628 | setLiteralValue(regExp: RegExp): this;
|
6629 | }
|
6630 |
|
6631 | declare const StringLiteralBase: typeof LiteralExpression;
|
6632 |
|
6633 | export declare class StringLiteral extends StringLiteralBase<ts.StringLiteral> {
|
6634 | |
6635 |
|
6636 |
|
6637 |
|
6638 |
|
6639 | getLiteralValue(): string;
|
6640 | |
6641 |
|
6642 |
|
6643 |
|
6644 | setLiteralValue(value: string): this;
|
6645 | |
6646 |
|
6647 |
|
6648 | getQuoteKind(): QuoteKind;
|
6649 | }
|
6650 |
|
6651 | declare const NoSubstitutionTemplateLiteralBase: typeof LiteralExpression;
|
6652 |
|
6653 | export declare class NoSubstitutionTemplateLiteral extends NoSubstitutionTemplateLiteralBase<ts.NoSubstitutionTemplateLiteral> {
|
6654 | |
6655 |
|
6656 |
|
6657 | getLiteralValue(): string;
|
6658 | |
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 |
|
6665 | setLiteralValue(value: string): TemplateLiteral;
|
6666 | }
|
6667 |
|
6668 | export declare class TaggedTemplateExpression extends MemberExpression<ts.TaggedTemplateExpression> {
|
6669 | |
6670 |
|
6671 |
|
6672 | getTag(): LeftHandSideExpression;
|
6673 | |
6674 |
|
6675 |
|
6676 | getTemplate(): TemplateLiteral;
|
6677 | |
6678 |
|
6679 |
|
6680 |
|
6681 | removeTag(): TemplateLiteral;
|
6682 | }
|
6683 |
|
6684 | declare const TemplateExpressionBase: typeof PrimaryExpression;
|
6685 |
|
6686 | export declare class TemplateExpression extends TemplateExpressionBase<ts.TemplateExpression> {
|
6687 | |
6688 |
|
6689 |
|
6690 | getHead(): TemplateHead;
|
6691 | |
6692 |
|
6693 |
|
6694 | getTemplateSpans(): TemplateSpan[];
|
6695 | |
6696 |
|
6697 |
|
6698 |
|
6699 |
|
6700 |
|
6701 |
|
6702 | setLiteralValue(value: string): TemplateLiteral;
|
6703 | }
|
6704 |
|
6705 | declare const TemplateHeadBase: Constructor<LiteralLikeNode> & typeof Node;
|
6706 |
|
6707 | export declare class TemplateHead extends TemplateHeadBase<ts.TemplateHead> {
|
6708 | }
|
6709 |
|
6710 | declare const TemplateMiddleBase: Constructor<LiteralLikeNode> & typeof Node;
|
6711 |
|
6712 | export declare class TemplateMiddle extends TemplateMiddleBase<ts.TemplateMiddle> {
|
6713 | }
|
6714 |
|
6715 | declare const TemplateSpanBase: Constructor<ExpressionedNode> & typeof Node;
|
6716 |
|
6717 | export declare class TemplateSpan extends TemplateSpanBase<ts.TemplateSpan> {
|
6718 | |
6719 |
|
6720 |
|
6721 | getLiteral(): TemplateMiddle | TemplateTail;
|
6722 | }
|
6723 |
|
6724 | declare const TemplateTailBase: Constructor<LiteralLikeNode> & typeof Node;
|
6725 |
|
6726 | export declare class TemplateTail extends TemplateTailBase<ts.TemplateTail> {
|
6727 | }
|
6728 |
|
6729 | declare const ExportAssignmentBase: typeof Statement;
|
6730 |
|
6731 | export declare class ExportAssignment extends ExportAssignmentBase<ts.ExportAssignment> {
|
6732 | |
6733 |
|
6734 |
|
6735 |
|
6736 |
|
6737 | isExportEquals(): boolean;
|
6738 | |
6739 |
|
6740 |
|
6741 |
|
6742 | setIsExportEquals(value: boolean): this;
|
6743 | |
6744 |
|
6745 |
|
6746 | getExpression(): Expression;
|
6747 | |
6748 |
|
6749 |
|
6750 |
|
6751 | setExpression(textOrWriterFunction: string | WriterFunction): this;
|
6752 | |
6753 |
|
6754 |
|
6755 |
|
6756 | set(structure: Partial<ExportAssignmentStructure>): this;
|
6757 | |
6758 |
|
6759 |
|
6760 | getStructure(): ExportAssignmentStructure;
|
6761 | }
|
6762 |
|
6763 | declare const ExportDeclarationBase: typeof Statement;
|
6764 |
|
6765 | export declare class ExportDeclaration extends ExportDeclarationBase<ts.ExportDeclaration> {
|
6766 | |
6767 |
|
6768 |
|
6769 |
|
6770 | setModuleSpecifier(text: string): this;
|
6771 | |
6772 |
|
6773 |
|
6774 |
|
6775 | setModuleSpecifier(sourceFile: SourceFile): this;
|
6776 | |
6777 |
|
6778 |
|
6779 | getModuleSpecifier(): StringLiteral | undefined;
|
6780 | |
6781 |
|
6782 |
|
6783 | getModuleSpecifierValue(): string | undefined;
|
6784 | |
6785 |
|
6786 |
|
6787 | getModuleSpecifierSourceFileOrThrow(): SourceFile;
|
6788 | |
6789 |
|
6790 |
|
6791 | getModuleSpecifierSourceFile(): SourceFile | undefined;
|
6792 | |
6793 |
|
6794 |
|
6795 | isModuleSpecifierRelative(): boolean;
|
6796 | |
6797 |
|
6798 |
|
6799 | removeModuleSpecifier(): this;
|
6800 | |
6801 |
|
6802 |
|
6803 | hasModuleSpecifier(): boolean;
|
6804 | |
6805 |
|
6806 |
|
6807 | isNamespaceExport(): boolean;
|
6808 | |
6809 |
|
6810 |
|
6811 | hasNamedExports(): boolean;
|
6812 | |
6813 |
|
6814 |
|
6815 |
|
6816 | addNamedExport(namedExport: ExportSpecifierStructure | string | WriterFunction): ExportSpecifier;
|
6817 | |
6818 |
|
6819 |
|
6820 |
|
6821 | addNamedExports(namedExports: ReadonlyArray<ExportSpecifierStructure | string | WriterFunction> | WriterFunction): ExportSpecifier[];
|
6822 | |
6823 |
|
6824 |
|
6825 |
|
6826 |
|
6827 | insertNamedExport(index: number, namedExport: ExportSpecifierStructure | string | WriterFunction): ExportSpecifier;
|
6828 | |
6829 |
|
6830 |
|
6831 |
|
6832 |
|
6833 | insertNamedExports(index: number, namedExports: ReadonlyArray<ExportSpecifierStructure | string | WriterFunction> | WriterFunction): ExportSpecifier[];
|
6834 | |
6835 |
|
6836 |
|
6837 | getNamedExports(): ExportSpecifier[];
|
6838 | |
6839 |
|
6840 |
|
6841 | toNamespaceExport(): this;
|
6842 | |
6843 |
|
6844 |
|
6845 |
|
6846 | set(structure: Partial<ExportDeclarationStructure>): this;
|
6847 | |
6848 |
|
6849 |
|
6850 | getStructure(): ExportDeclarationStructure;
|
6851 | }
|
6852 |
|
6853 | declare const ExportSpecifierBase: typeof Node;
|
6854 |
|
6855 | export declare class ExportSpecifier extends ExportSpecifierBase<ts.ExportSpecifier> {
|
6856 | |
6857 |
|
6858 |
|
6859 | setName(name: string): this;
|
6860 | |
6861 |
|
6862 |
|
6863 | getName(): string;
|
6864 | |
6865 |
|
6866 |
|
6867 | getNameNode(): Identifier;
|
6868 | |
6869 |
|
6870 |
|
6871 |
|
6872 | renameAlias(alias: string): this;
|
6873 | |
6874 |
|
6875 |
|
6876 |
|
6877 | setAlias(alias: string): this;
|
6878 | |
6879 |
|
6880 |
|
6881 |
|
6882 | removeAlias(): this;
|
6883 | |
6884 |
|
6885 |
|
6886 | removeAliasWithRename(): this;
|
6887 | |
6888 |
|
6889 |
|
6890 | getAliasNode(): Identifier | undefined;
|
6891 | |
6892 |
|
6893 |
|
6894 | getExportDeclaration(): ExportDeclaration;
|
6895 | |
6896 |
|
6897 |
|
6898 | getLocalTargetSymbolOrThrow(): Symbol;
|
6899 | |
6900 |
|
6901 |
|
6902 | getLocalTargetSymbol(): Symbol | undefined;
|
6903 | |
6904 |
|
6905 |
|
6906 | getLocalTargetDeclarations(): Node[];
|
6907 | |
6908 |
|
6909 |
|
6910 | remove(): void;
|
6911 | |
6912 |
|
6913 |
|
6914 |
|
6915 | set(structure: Partial<ExportSpecifierStructure>): this;
|
6916 | |
6917 |
|
6918 |
|
6919 | getStructure(): ExportSpecifierStructure;
|
6920 | }
|
6921 |
|
6922 | export declare class ExternalModuleReference extends Node<ts.ExternalModuleReference> {
|
6923 | |
6924 |
|
6925 |
|
6926 | getExpression(): Expression | undefined;
|
6927 | |
6928 |
|
6929 |
|
6930 | getExpressionOrThrow(): Expression<ts.Expression>;
|
6931 | |
6932 |
|
6933 |
|
6934 | getReferencedSourceFileOrThrow(): SourceFile;
|
6935 | |
6936 |
|
6937 |
|
6938 | isRelative(): boolean;
|
6939 | |
6940 |
|
6941 |
|
6942 | getReferencedSourceFile(): SourceFile | undefined;
|
6943 | }
|
6944 |
|
6945 |
|
6946 |
|
6947 | export declare enum FileSystemRefreshResult {
|
6948 |
|
6949 | NoChange = 0,
|
6950 |
|
6951 | Updated = 1,
|
6952 |
|
6953 | Deleted = 2
|
6954 | }
|
6955 |
|
6956 | declare const ImportClauseBase: typeof Node;
|
6957 |
|
6958 | export declare class ImportClause extends ImportClauseBase<ts.ImportClause> {
|
6959 | |
6960 |
|
6961 |
|
6962 | getDefaultImportOrThrow(): Identifier;
|
6963 | |
6964 |
|
6965 |
|
6966 | getDefaultImport(): Identifier | undefined;
|
6967 | |
6968 |
|
6969 |
|
6970 | getNamedBindingsOrThrow(): NamespaceImport | NamedImports;
|
6971 | |
6972 |
|
6973 |
|
6974 | getNamedBindings(): NamespaceImport | NamedImports | undefined;
|
6975 | |
6976 |
|
6977 |
|
6978 | getNamespaceImportOrThrow(): Identifier;
|
6979 | |
6980 |
|
6981 |
|
6982 | getNamespaceImport(): Identifier | undefined;
|
6983 | |
6984 |
|
6985 |
|
6986 | getNamedImports(): ImportSpecifier[];
|
6987 | }
|
6988 |
|
6989 | declare const ImportDeclarationBase: typeof Statement;
|
6990 |
|
6991 | export declare class ImportDeclaration extends ImportDeclarationBase<ts.ImportDeclaration> {
|
6992 | |
6993 |
|
6994 |
|
6995 |
|
6996 | setModuleSpecifier(text: string): this;
|
6997 | |
6998 |
|
6999 |
|
7000 |
|
7001 | setModuleSpecifier(sourceFile: SourceFile): this;
|
7002 | |
7003 |
|
7004 |
|
7005 | getModuleSpecifier(): StringLiteral;
|
7006 | |
7007 |
|
7008 |
|
7009 | getModuleSpecifierValue(): string;
|
7010 | |
7011 |
|
7012 |
|
7013 | getModuleSpecifierSourceFileOrThrow(): SourceFile;
|
7014 | |
7015 |
|
7016 |
|
7017 | getModuleSpecifierSourceFile(): SourceFile | undefined;
|
7018 | |
7019 |
|
7020 |
|
7021 | isModuleSpecifierRelative(): boolean;
|
7022 | |
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 | setDefaultImport(text: string): this;
|
7028 | |
7029 |
|
7030 |
|
7031 |
|
7032 | renameDefaultImport(text: string): this;
|
7033 | |
7034 |
|
7035 |
|
7036 | getDefaultImportOrThrow(): Identifier;
|
7037 | |
7038 |
|
7039 |
|
7040 | getDefaultImport(): Identifier | undefined;
|
7041 | |
7042 |
|
7043 |
|
7044 |
|
7045 |
|
7046 | setNamespaceImport(text: string): this;
|
7047 | |
7048 |
|
7049 |
|
7050 | removeNamespaceImport(): this;
|
7051 | |
7052 |
|
7053 |
|
7054 | removeDefaultImport(): this;
|
7055 | |
7056 |
|
7057 |
|
7058 | getNamespaceImportOrThrow(): Identifier;
|
7059 | |
7060 |
|
7061 |
|
7062 | getNamespaceImport(): Identifier | undefined;
|
7063 | |
7064 |
|
7065 |
|
7066 |
|
7067 | addNamedImport(namedImport: ImportSpecifierStructure | string | WriterFunction): ImportSpecifier;
|
7068 | |
7069 |
|
7070 |
|
7071 |
|
7072 | addNamedImports(namedImports: ReadonlyArray<ImportSpecifierStructure | string | WriterFunction> | WriterFunction): ImportSpecifier[];
|
7073 | |
7074 |
|
7075 |
|
7076 |
|
7077 |
|
7078 | insertNamedImport(index: number, namedImport: ImportSpecifierStructure | string | WriterFunction): ImportSpecifier;
|
7079 | |
7080 |
|
7081 |
|
7082 |
|
7083 |
|
7084 | insertNamedImports(index: number, namedImports: ReadonlyArray<ImportSpecifierStructure | string | WriterFunction> | WriterFunction): ImportSpecifier[];
|
7085 | |
7086 |
|
7087 |
|
7088 | getNamedImports(): ImportSpecifier[];
|
7089 | |
7090 |
|
7091 |
|
7092 | removeNamedImports(): this;
|
7093 | |
7094 |
|
7095 |
|
7096 | getImportClauseOrThrow(): ImportClause;
|
7097 | |
7098 |
|
7099 |
|
7100 | getImportClause(): ImportClause | undefined;
|
7101 | |
7102 |
|
7103 |
|
7104 |
|
7105 | set(structure: Partial<ImportDeclarationStructure>): this;
|
7106 | |
7107 |
|
7108 |
|
7109 | getStructure(): ImportDeclarationStructure;
|
7110 | }
|
7111 |
|
7112 | declare const ImportEqualsDeclarationBase: Constructor<JSDocableNode> & Constructor<NamedNode> & typeof Statement;
|
7113 |
|
7114 | export declare class ImportEqualsDeclaration extends ImportEqualsDeclarationBase<ts.ImportEqualsDeclaration> {
|
7115 | |
7116 |
|
7117 |
|
7118 | getModuleReference(): ModuleReference;
|
7119 | |
7120 |
|
7121 |
|
7122 | isExternalModuleReferenceRelative(): boolean;
|
7123 | |
7124 |
|
7125 |
|
7126 |
|
7127 | setExternalModuleReference(externalModuleReference: string): this;
|
7128 | |
7129 |
|
7130 |
|
7131 |
|
7132 | setExternalModuleReference(sourceFile: SourceFile): this;
|
7133 | |
7134 |
|
7135 |
|
7136 | getExternalModuleReferenceSourceFileOrThrow(): SourceFile;
|
7137 | |
7138 |
|
7139 |
|
7140 | getExternalModuleReferenceSourceFile(): SourceFile | undefined;
|
7141 | }
|
7142 |
|
7143 | declare const ImportSpecifierBase: typeof Node;
|
7144 |
|
7145 | export declare class ImportSpecifier extends ImportSpecifierBase<ts.ImportSpecifier> {
|
7146 | |
7147 |
|
7148 |
|
7149 |
|
7150 | setName(name: string): this;
|
7151 | |
7152 |
|
7153 |
|
7154 | getName(): string;
|
7155 | |
7156 |
|
7157 |
|
7158 | getNameNode(): Identifier;
|
7159 | |
7160 |
|
7161 |
|
7162 |
|
7163 | renameAlias(alias: string): this;
|
7164 | |
7165 |
|
7166 |
|
7167 |
|
7168 | setAlias(alias: string): this;
|
7169 | |
7170 |
|
7171 |
|
7172 |
|
7173 | removeAlias(): this;
|
7174 | |
7175 |
|
7176 |
|
7177 | removeAliasWithRename(): this;
|
7178 | |
7179 |
|
7180 |
|
7181 | getAliasNode(): Identifier | undefined;
|
7182 | |
7183 |
|
7184 |
|
7185 | getImportDeclaration(): ImportDeclaration;
|
7186 | |
7187 |
|
7188 |
|
7189 | remove(): void;
|
7190 | |
7191 |
|
7192 |
|
7193 |
|
7194 | set(structure: Partial<ImportSpecifierStructure>): this;
|
7195 | |
7196 |
|
7197 |
|
7198 | getStructure(): ImportSpecifierStructure;
|
7199 | }
|
7200 |
|
7201 | declare const ModuleBlockBase: Constructor<StatementedNode> & typeof Statement;
|
7202 |
|
7203 | export declare class ModuleBlock extends ModuleBlockBase<ts.ModuleBlock> {
|
7204 | }
|
7205 |
|
7206 | declare const NamedExportsBase: typeof Node;
|
7207 |
|
7208 | export declare class NamedExports extends NamedExportsBase<ts.NamedExports> {
|
7209 |
|
7210 | getElements(): ExportSpecifier[];
|
7211 | }
|
7212 |
|
7213 | declare const NamedImportsBase: typeof Node;
|
7214 |
|
7215 | export declare class NamedImports extends NamedImportsBase<ts.NamedImports> {
|
7216 |
|
7217 | getElements(): ImportSpecifier[];
|
7218 | }
|
7219 |
|
7220 | export declare function NamespaceChildableNode<T extends Constructor<NamespaceChildableNodeExtensionType>>(Base: T): Constructor<NamespaceChildableNode> & T;
|
7221 |
|
7222 | export interface NamespaceChildableNode {
|
7223 | |
7224 |
|
7225 |
|
7226 | getParentNamespace(): NamespaceDeclaration | undefined;
|
7227 | |
7228 |
|
7229 |
|
7230 | getParentNamespaceOrThrow(): NamespaceDeclaration;
|
7231 | }
|
7232 |
|
7233 | declare type NamespaceChildableNodeExtensionType = Node;
|
7234 |
|
7235 | declare const NamespaceDeclarationBase: Constructor<ModuledNode> & Constructor<ChildOrderableNode> & Constructor<UnwrappableNode> & Constructor<TextInsertableNode> & Constructor<BodiedNode> & Constructor<NamespaceChildableNode> & Constructor<StatementedNode> & Constructor<JSDocableNode> & Constructor<AmbientableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & Constructor<NamedNode> & typeof Statement;
|
7236 |
|
7237 | export declare class NamespaceDeclaration extends NamespaceDeclarationBase<ts.NamespaceDeclaration> {
|
7238 | |
7239 |
|
7240 |
|
7241 | getName(): string;
|
7242 | |
7243 |
|
7244 |
|
7245 |
|
7246 | setName(newName: string): this;
|
7247 | |
7248 |
|
7249 |
|
7250 |
|
7251 | rename(newName: string): this;
|
7252 | |
7253 |
|
7254 |
|
7255 | getNameNodes(): Identifier[];
|
7256 | |
7257 |
|
7258 |
|
7259 | hasNamespaceKeyword(): boolean;
|
7260 | |
7261 |
|
7262 |
|
7263 | hasModuleKeyword(): boolean;
|
7264 | |
7265 |
|
7266 |
|
7267 |
|
7268 | setDeclarationKind(kind: NamespaceDeclarationKind): this;
|
7269 | |
7270 |
|
7271 |
|
7272 | getDeclarationKind(): NamespaceDeclarationKind;
|
7273 | |
7274 |
|
7275 |
|
7276 | getDeclarationKindKeyword(): Node<ts.Node> | undefined;
|
7277 | |
7278 |
|
7279 |
|
7280 |
|
7281 | set(structure: Partial<NamespaceDeclarationStructure>): this;
|
7282 | |
7283 |
|
7284 |
|
7285 | getStructure(): NamespaceDeclarationStructure;
|
7286 | }
|
7287 | export declare enum NamespaceDeclarationKind {
|
7288 | Namespace = "namespace",
|
7289 | Module = "module",
|
7290 | Global = "global"
|
7291 | }
|
7292 |
|
7293 | declare const NamespaceImportBase: Constructor<RenameableNode> & typeof Node;
|
7294 |
|
7295 | export declare class NamespaceImport extends NamespaceImportBase<ts.NamespaceImport> {
|
7296 | |
7297 |
|
7298 |
|
7299 | setName(name: string): this;
|
7300 | |
7301 |
|
7302 |
|
7303 | getName(): string;
|
7304 | |
7305 |
|
7306 |
|
7307 | getNameNode(): Identifier;
|
7308 | }
|
7309 |
|
7310 | export interface SourceFileCopyOptions {
|
7311 | overwrite?: boolean;
|
7312 | }
|
7313 |
|
7314 | export interface SourceFileMoveOptions {
|
7315 | overwrite?: boolean;
|
7316 | }
|
7317 |
|
7318 |
|
7319 |
|
7320 |
|
7321 | export interface SourceFileEmitOptions extends EmitOptionsBase {
|
7322 | }
|
7323 |
|
7324 | declare const SourceFileBase: Constructor<ModuledNode> & Constructor<StatementedNode> & Constructor<TextInsertableNode> & typeof Node;
|
7325 |
|
7326 | export declare class SourceFile extends SourceFileBase<ts.SourceFile> {
|
7327 | private constructor();
|
7328 | /**
|
7329 | * Gets the file path.
|
7330 | */
|
7331 | getFilePath(): string;
|
7332 | /**
|
7333 | * Gets the file path's base name.
|
7334 | */
|
7335 | getBaseName(): string;
|
7336 | /**
|
7337 | * Gets the file path's base name without the extension.
|
7338 | */
|
7339 | getBaseNameWithoutExtension(): string;
|
7340 | /**
|
7341 | * Gets the file path's extension.
|
7342 | */
|
7343 | getExtension(): string;
|
7344 | /**
|
7345 | * Gets the directory that the source file is contained in.
|
7346 | */
|
7347 | getDirectory(): Directory;
|
7348 | /**
|
7349 | * Gets the directory path that the source file is contained in.
|
7350 | */
|
7351 | getDirectoryPath(): string;
|
7352 | /**
|
7353 | * Gets the full text with leading trivia.
|
7354 | */
|
7355 | getFullText(): string;
|
7356 | /**
|
7357 | * Gets the line number at the provided position.
|
7358 | * @param pos - Position
|
7359 | */
|
7360 | getLineNumberAtPos(pos: number): number;
|
7361 | /**
|
7362 | * Gets the character count from the start of the line to the provided position.
|
7363 | * @param pos - Position.
|
7364 | */
|
7365 | getLengthFromLineStartAtPos(pos: number): number;
|
7366 | /**
|
7367 | * Copies this source file to the specified directory.
|
7368 | *
|
7369 | * This will modify the module specifiers in the new file, if necessary.
|
7370 | * @param dirPathOrDirectory Directory path or directory object to copy the file to.
|
7371 | * @param options Options for copying.
|
7372 | * @returns The source file the copy was made to.
|
7373 | */
|
7374 | copyToDirectory(dirPathOrDirectory: string | Directory, options?: SourceFileCopyOptions): SourceFile;
|
7375 | /**
|
7376 | * Copy this source file to a new file.
|
7377 | *
|
7378 | * This will modify the module specifiers in the new file, if necessary.
|
7379 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7380 | * @param options - Options for copying.
|
7381 | */
|
7382 | copy(filePath: string, options?: SourceFileCopyOptions): SourceFile;
|
7383 | /**
|
7384 | * Copy this source file to a new file and immediately saves it to the file system asynchronously.
|
7385 | *
|
7386 | * This will modify the module specifiers in the new file, if necessary.
|
7387 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7388 | * @param options - Options for copying.
|
7389 | */
|
7390 | copyImmediately(filePath: string, options?: SourceFileCopyOptions): Promise<SourceFile>;
|
7391 | /**
|
7392 | * Copy this source file to a new file and immediately saves it to the file system synchronously.
|
7393 | *
|
7394 | * This will modify the module specifiers in the new file, if necessary.
|
7395 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7396 | * @param options - Options for copying.
|
7397 | */
|
7398 | copyImmediatelySync(filePath: string, options?: SourceFileCopyOptions): SourceFile;
|
7399 | /**
|
7400 | * Moves this source file to the specified directory.
|
7401 | *
|
7402 | * This will modify the module specifiers in other files that specify this file and the module specifiers in the current file, if necessary.
|
7403 | * @param dirPathOrDirectory Directory path or directory object to move the file to.
|
7404 | * @param options Options for moving.
|
7405 | */
|
7406 | moveToDirectory(dirPathOrDirectory: string | Directory, options?: SourceFileMoveOptions): SourceFile;
|
7407 | /**
|
7408 | * Moves this source file to a new file.
|
7409 | *
|
7410 | * This will modify the module specifiers in other files that specify this file and the module specifiers in the current file, if necessary.
|
7411 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7412 | * @param options - Options for moving.
|
7413 | */
|
7414 | move(filePath: string, options?: SourceFileMoveOptions): SourceFile;
|
7415 | /**
|
7416 | * Moves this source file to a new file and asynchronously updates the file system immediately.
|
7417 | *
|
7418 | * This will modify the module specifiers in other files that specify this file and the module specifiers in the current file, if necessary.
|
7419 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7420 | * @param options - Options for moving.
|
7421 | */
|
7422 | moveImmediately(filePath: string, options?: SourceFileMoveOptions): Promise<SourceFile>;
|
7423 | /**
|
7424 | * Moves this source file to a new file and synchronously updates the file system immediately.
|
7425 | *
|
7426 | * This will modify the module specifiers in other files that specify this file and the module specifiers in the current file, if necessary.
|
7427 | * @param filePath - New file path. Can be relative to the original file or an absolute path.
|
7428 | * @param options - Options for moving.
|
7429 | */
|
7430 | moveImmediatelySync(filePath: string, options?: SourceFileMoveOptions): SourceFile;
|
7431 | /**
|
7432 | * Queues a deletion of the file to the file system.
|
7433 | *
|
7434 | * The file will be deleted when you call ast.save(). If you wish to immediately delete the file, then use deleteImmediately().
|
7435 | */
|
7436 | delete(): void;
|
7437 | /**
|
7438 | * Asynchronously deletes the file from the file system.
|
7439 | */
|
7440 | deleteImmediately(): Promise<void>;
|
7441 | /**
|
7442 | * Synchronously deletes the file from the file system.
|
7443 | */
|
7444 | deleteImmediatelySync(): void;
|
7445 | /**
|
7446 | * Asynchronously saves this file with any changes.
|
7447 | */
|
7448 | save(): Promise<void>;
|
7449 | /**
|
7450 | * Synchronously saves this file with any changes.
|
7451 | */
|
7452 | saveSync(): void;
|
7453 | /**
|
7454 | * Gets any source files referenced via `/// <reference path="..." />` comments.
|
7455 | */
|
7456 | getReferencedFiles(): SourceFile[];
|
7457 | /**
|
7458 | * Gets any source files referenced via `/// <reference types="..." />` comments.
|
7459 | */
|
7460 | getTypeReferenceDirectives(): SourceFile[];
|
7461 | /**
|
7462 | * Get any source files that reference this source file.
|
7463 | */
|
7464 | getReferencingSourceFiles(): SourceFile[];
|
7465 | /**
|
7466 | * Gets the import and exports in other source files that reference this source file.
|
7467 | */
|
7468 | getReferencingNodesInOtherSourceFiles(): SourceFileReferencingNodes[];
|
7469 | /**
|
7470 | * Gets the string literals in other source files that reference this source file.
|
7471 | */
|
7472 | getReferencingLiteralsInOtherSourceFiles(): StringLiteral[];
|
7473 | /**
|
7474 | * Gets all the descendant string literals that reference a source file.
|
7475 | */
|
7476 | getImportStringLiterals(): StringLiteral[];
|
7477 | /**
|
7478 | * Gets the script target of the source file.
|
7479 | */
|
7480 | getLanguageVersion(): ScriptTarget;
|
7481 | /**
|
7482 | * Gets the language variant of the source file.
|
7483 | */
|
7484 | getLanguageVariant(): LanguageVariant;
|
7485 | /**
|
7486 | * Gets if this is a declaration file.
|
7487 | */
|
7488 | isDeclarationFile(): boolean;
|
7489 | /**
|
7490 | * Gets if the source file was discovered while loading an external library.
|
7491 | */
|
7492 | isFromExternalLibrary(): boolean;
|
7493 | /**
|
7494 | * Gets if the source file is a descendant of a node_modules directory.
|
7495 | */
|
7496 | isInNodeModules(): boolean;
|
7497 | /**
|
7498 | * Gets if this source file has been saved or if the latest changes have been saved.
|
7499 | */
|
7500 | isSaved(): boolean;
|
7501 | /**
|
7502 | * Gets the pre-emit diagnostics of the specified source file.
|
7503 | */
|
7504 | getPreEmitDiagnostics(): Diagnostic[];
|
7505 | /**
|
7506 | * Deindents the line at the specified position.
|
7507 | * @param pos - Position.
|
7508 | * @param times - Times to unindent. Specify a negative value to indent.
|
7509 | */
|
7510 | unindent(pos: number, times?: number): this;
|
7511 | /**
|
7512 | * Deindents the lines within the specified range.
|
7513 | * @param positionRange - Position range.
|
7514 | * @param times - Times to unindent. Specify a negative value to indent.
|
7515 | */
|
7516 | unindent(positionRange: [number, number], times?: number): this;
|
7517 | /**
|
7518 | * Indents the line at the specified position.
|
7519 | * @param pos - Position.
|
7520 | * @param times - Times to indent. Specify a negative value to unindent.
|
7521 | */
|
7522 | indent(pos: number, times?: number): this;
|
7523 | /**
|
7524 | * Indents the lines within the specified range.
|
7525 | * @param positionRange - Position range.
|
7526 | * @param times - Times to indent. Specify a negative value to unindent.
|
7527 | */
|
7528 | indent(positionRange: [number, number], times?: number): this;
|
7529 | /**
|
7530 | * Emits the source file.
|
7531 | */
|
7532 | emit(options?: SourceFileEmitOptions): EmitResult;
|
7533 | /**
|
7534 | * Gets the emit output of this source file.
|
7535 | * @param options - Emit options.
|
7536 | */
|
7537 | getEmitOutput(options?: {
|
7538 | emitOnlyDtsFiles?: boolean;
|
7539 | }): EmitOutput;
|
7540 | /**
|
7541 | * Formats the source file text using the internal TypeScript formatting API.
|
7542 | * @param settings - Format code settings.
|
7543 | */
|
7544 | formatText(settings?: FormatCodeSettings): void;
|
7545 | /**
|
7546 | * Refresh the source file from the file system.
|
7547 | *
|
7548 | * WARNING: When updating from the file system, this will "forget" any previously navigated nodes.
|
7549 | * @returns What action ended up taking place.
|
7550 | */
|
7551 | refreshFromFileSystem(): Promise<FileSystemRefreshResult>;
|
7552 | /**
|
7553 | * Synchronously refreshes the source file from the file system.
|
7554 | *
|
7555 | * WARNING: When updating from the file system, this will "forget" any previously navigated nodes.
|
7556 | * @returns What action ended up taking place.
|
7557 | */
|
7558 | refreshFromFileSystemSync(): FileSystemRefreshResult;
|
7559 | /**
|
7560 | * Gets the relative path to another source file.
|
7561 | * @param sourceFile - Source file.
|
7562 | */
|
7563 | getRelativePathTo(sourceFile: SourceFile): string;
|
7564 | /**
|
7565 | * Gets the relative path to another directory.
|
7566 | * @param directory - Directory.
|
7567 | */
|
7568 | getRelativePathTo(directory: Directory): string;
|
7569 | /**
|
7570 | * Gets the relative path to the specified source file as a module specifier.
|
7571 | * @param sourceFile - Source file.
|
7572 | */
|
7573 | getRelativePathAsModuleSpecifierTo(sourceFile: SourceFile): string;
|
7574 | /**
|
7575 | * Gets the relative path to the specified directory as a module specifier.
|
7576 | * @param directory - Directory.
|
7577 | */
|
7578 | getRelativePathAsModuleSpecifierTo(directory: Directory): string;
|
7579 | /**
|
7580 | * Subscribe to when the source file is modified.
|
7581 | * @param subscription - Subscription.
|
7582 | * @param subscribe - Optional and defaults to true. Use an explicit false to unsubscribe.
|
7583 | */
|
7584 | onModified(subscription: (sender: SourceFile) => void, subscribe?: boolean): this;
|
7585 | /**
|
7586 | * Organizes the imports in the file.
|
7587 | *
|
7588 | * WARNING! This will forget all the nodes in the file! It's best to do this after you're all done with the file.
|
7589 | * @param formatSettings - Format code settings.
|
7590 | * @param userPreferences - User preferences for refactoring.
|
7591 | */
|
7592 | organizeImports(formatSettings?: FormatCodeSettings, userPreferences?: UserPreferences): this;
|
7593 | /**
|
7594 | * Code fix to add import declarations for identifiers that are referenced, but not imported in the source file.
|
7595 | * @param formatSettings - Format code settings.
|
7596 | * @param userPreferences - User preferences for refactoring.
|
7597 | */
|
7598 | fixMissingImports(formatSettings?: FormatCodeSettings, userPreferences?: UserPreferences): this;
|
7599 | /**
|
7600 | * Applies the text changes to the source file.
|
7601 | *
|
7602 | * WARNING! This will forget all the nodes in the file! It's best to do this after you're all done with the file.
|
7603 | * @param textChanges - Text changes.
|
7604 | */
|
7605 | applyTextChanges(textChanges: ReadonlyArray<TextChange>): this;
|
7606 | /**
|
7607 | * Sets the node from a structure.
|
7608 | * @param structure - Structure to set the node with.
|
7609 | */
|
7610 | set(structure: Partial<SourceFileStructure>): this;
|
7611 | /**
|
7612 | * Gets the structure equivalent to this node.
|
7613 | */
|
7614 | getStructure(): SourceFileStructure;
|
7615 | private _refreshFromFileSystemInternal;
|
7616 | }
|
7617 |
|
7618 | declare const BlockBase: Constructor<TextInsertableNode> & Constructor<StatementedNode> & typeof Statement;
|
7619 |
|
7620 | export declare class Block extends BlockBase<ts.Block> {
|
7621 | }
|
7622 |
|
7623 | declare const BreakStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
7624 |
|
7625 | export declare class BreakStatement extends BreakStatementBase<ts.BreakStatement> {
|
7626 | |
7627 |
|
7628 |
|
7629 | getLabel(): Identifier | undefined;
|
7630 | |
7631 |
|
7632 |
|
7633 | getLabelOrThrow(): Identifier;
|
7634 | }
|
7635 |
|
7636 | declare const CaseBlockBase: Constructor<TextInsertableNode> & typeof Node;
|
7637 |
|
7638 | export declare class CaseBlock extends CaseBlockBase<ts.CaseBlock> {
|
7639 | |
7640 |
|
7641 |
|
7642 | getClauses(): CaseOrDefaultClause[];
|
7643 | |
7644 |
|
7645 |
|
7646 |
|
7647 | removeClause(index: number): this;
|
7648 | |
7649 |
|
7650 |
|
7651 |
|
7652 | removeClauses(indexRange: [number, number]): this;
|
7653 | }
|
7654 |
|
7655 | declare const CaseClauseBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<StatementedNode> & typeof Node;
|
7656 |
|
7657 | export declare class CaseClause extends CaseClauseBase<ts.CaseClause> {
|
7658 | |
7659 |
|
7660 |
|
7661 | getExpression(): Expression;
|
7662 | |
7663 |
|
7664 |
|
7665 | remove(): void;
|
7666 | }
|
7667 |
|
7668 | declare const CatchClauseBase: typeof Node;
|
7669 |
|
7670 | export declare class CatchClause extends CatchClauseBase<ts.CatchClause> {
|
7671 | |
7672 |
|
7673 |
|
7674 | getBlock(): Block;
|
7675 | |
7676 |
|
7677 |
|
7678 | getVariableDeclaration(): VariableDeclaration | undefined;
|
7679 | |
7680 |
|
7681 |
|
7682 | getVariableDeclarationOrThrow(): VariableDeclaration;
|
7683 | }
|
7684 |
|
7685 | declare const ContinueStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
7686 |
|
7687 | export declare class ContinueStatement extends ContinueStatementBase<ts.ContinueStatement> {
|
7688 | |
7689 |
|
7690 |
|
7691 | getLabel(): Identifier | undefined;
|
7692 | |
7693 |
|
7694 |
|
7695 | getLabelOrThrow(): Identifier;
|
7696 | }
|
7697 |
|
7698 | declare const DebuggerStatementBase: typeof Statement;
|
7699 |
|
7700 | export declare class DebuggerStatement extends DebuggerStatementBase<ts.DebuggerStatement> {
|
7701 | }
|
7702 |
|
7703 | declare const DefaultClauseBase: Constructor<ChildOrderableNode> & Constructor<TextInsertableNode> & Constructor<StatementedNode> & typeof Node;
|
7704 |
|
7705 | export declare class DefaultClause extends DefaultClauseBase<ts.DefaultClause> {
|
7706 | |
7707 |
|
7708 |
|
7709 | remove(): void;
|
7710 | }
|
7711 |
|
7712 | declare const DoStatementBase: typeof IterationStatement;
|
7713 |
|
7714 | export declare class DoStatement extends DoStatementBase<ts.DoStatement> {
|
7715 | |
7716 |
|
7717 |
|
7718 | getExpression(): Expression;
|
7719 | }
|
7720 |
|
7721 | declare const EmptyStatementBase: typeof Statement;
|
7722 |
|
7723 | export declare class EmptyStatement extends EmptyStatementBase<ts.EmptyStatement> {
|
7724 | }
|
7725 |
|
7726 | declare const ExpressionStatementBase: Constructor<JSDocableNode> & Constructor<ChildOrderableNode> & typeof Statement;
|
7727 |
|
7728 | export declare class ExpressionStatement extends ExpressionStatementBase<ts.ExpressionStatement> {
|
7729 | |
7730 |
|
7731 |
|
7732 | getExpression(): Expression;
|
7733 | }
|
7734 |
|
7735 | declare const ForInStatementBase: typeof IterationStatement;
|
7736 |
|
7737 | export declare class ForInStatement extends ForInStatementBase<ts.ForInStatement> {
|
7738 | |
7739 |
|
7740 |
|
7741 | getInitializer(): VariableDeclarationList | Expression;
|
7742 | |
7743 |
|
7744 |
|
7745 | getExpression(): Expression;
|
7746 | }
|
7747 |
|
7748 | declare const ForOfStatementBase: Constructor<AwaitableNode> & typeof IterationStatement;
|
7749 |
|
7750 | export declare class ForOfStatement extends ForOfStatementBase<ts.ForOfStatement> {
|
7751 | |
7752 |
|
7753 |
|
7754 | getInitializer(): VariableDeclarationList | Expression;
|
7755 | |
7756 |
|
7757 |
|
7758 | getExpression(): Expression;
|
7759 | }
|
7760 |
|
7761 | declare const ForStatementBase: typeof IterationStatement;
|
7762 |
|
7763 | export declare class ForStatement extends ForStatementBase<ts.ForStatement> {
|
7764 | |
7765 |
|
7766 |
|
7767 | getInitializer(): VariableDeclarationList | Expression | undefined;
|
7768 | |
7769 |
|
7770 |
|
7771 | getInitializerOrThrow(): Expression<ts.Expression> | VariableDeclarationList;
|
7772 | |
7773 |
|
7774 |
|
7775 | getCondition(): Expression | undefined;
|
7776 | |
7777 |
|
7778 |
|
7779 | getConditionOrThrow(): Expression<ts.Expression>;
|
7780 | |
7781 |
|
7782 |
|
7783 | getIncrementor(): Expression | undefined;
|
7784 | |
7785 |
|
7786 |
|
7787 | getIncrementorOrThrow(): Expression<ts.Expression>;
|
7788 | }
|
7789 |
|
7790 | declare const IfStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
7791 |
|
7792 | export declare class IfStatement extends IfStatementBase<ts.IfStatement> {
|
7793 | |
7794 |
|
7795 |
|
7796 | getExpression(): Expression;
|
7797 | |
7798 |
|
7799 |
|
7800 | getThenStatement(): Statement;
|
7801 | |
7802 |
|
7803 |
|
7804 | getElseStatement(): Statement | undefined;
|
7805 | }
|
7806 |
|
7807 | declare const IterationStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
7808 |
|
7809 | export declare class IterationStatement<T extends ts.IterationStatement = ts.IterationStatement> extends IterationStatementBase<T> {
|
7810 | |
7811 |
|
7812 |
|
7813 | getStatement(): Statement;
|
7814 | }
|
7815 |
|
7816 | declare const LabeledStatementBase: Constructor<JSDocableNode> & Constructor<ChildOrderableNode> & typeof Statement;
|
7817 |
|
7818 | export declare class LabeledStatement extends LabeledStatementBase<ts.LabeledStatement> {
|
7819 | |
7820 |
|
7821 |
|
7822 | getLabel(): Identifier;
|
7823 | |
7824 |
|
7825 |
|
7826 | getStatement(): Statement;
|
7827 | }
|
7828 |
|
7829 | declare const NotEmittedStatementBase: typeof Statement;
|
7830 |
|
7831 | export declare class NotEmittedStatement extends NotEmittedStatementBase<ts.NotEmittedStatement> {
|
7832 | }
|
7833 |
|
7834 | declare const ReturnStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
7835 |
|
7836 | export declare class ReturnStatement extends ReturnStatementBase<ts.ReturnStatement> {
|
7837 | |
7838 |
|
7839 |
|
7840 | getExpressionOrThrow(): Expression<ts.Expression>;
|
7841 | |
7842 |
|
7843 |
|
7844 | getExpression(): Expression | undefined;
|
7845 | }
|
7846 |
|
7847 | export declare class Statement<T extends ts.Statement = ts.Statement> extends Node<T> {
|
7848 | |
7849 |
|
7850 |
|
7851 | remove(): void;
|
7852 | }
|
7853 |
|
7854 | export declare function StatementedNode<T extends Constructor<StatementedNodeExtensionType>>(Base: T): Constructor<StatementedNode> & T;
|
7855 |
|
7856 | export interface StatementedNode {
|
7857 | |
7858 |
|
7859 |
|
7860 | getStatements(): Statement[];
|
7861 | |
7862 |
|
7863 |
|
7864 |
|
7865 | getStatement(findFunction: (statement: Node) => boolean): Statement | undefined;
|
7866 | |
7867 |
|
7868 |
|
7869 |
|
7870 | getStatementOrThrow(findFunction: (statement: Node) => boolean): Statement;
|
7871 | |
7872 |
|
7873 |
|
7874 |
|
7875 | getStatementByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined;
|
7876 | |
7877 |
|
7878 |
|
7879 |
|
7880 | getStatementByKindOrThrow<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind];
|
7881 | |
7882 |
|
7883 |
|
7884 |
|
7885 |
|
7886 | addStatements(textOrWriterFunction: string | WriterFunction): Statement[];
|
7887 | |
7888 |
|
7889 |
|
7890 |
|
7891 |
|
7892 |
|
7893 | insertStatements(index: number, textOrWriterFunction: string | WriterFunction): Statement[];
|
7894 | |
7895 |
|
7896 |
|
7897 |
|
7898 | removeStatement(index: number): this;
|
7899 | |
7900 |
|
7901 |
|
7902 |
|
7903 | removeStatements(indexRange: [number, number]): this;
|
7904 | |
7905 |
|
7906 |
|
7907 |
|
7908 | addClass(structure: ClassDeclarationStructure): ClassDeclaration;
|
7909 | |
7910 |
|
7911 |
|
7912 |
|
7913 | addClasses(structures: ReadonlyArray<ClassDeclarationStructure>): ClassDeclaration[];
|
7914 | |
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 | insertClass(index: number, structure: ClassDeclarationStructure): ClassDeclaration;
|
7920 | |
7921 |
|
7922 |
|
7923 |
|
7924 |
|
7925 | insertClasses(index: number, structures: ReadonlyArray<ClassDeclarationStructure>): ClassDeclaration[];
|
7926 | |
7927 |
|
7928 |
|
7929 | getClasses(): ClassDeclaration[];
|
7930 | |
7931 |
|
7932 |
|
7933 |
|
7934 | getClass(name: string): ClassDeclaration | undefined;
|
7935 | |
7936 |
|
7937 |
|
7938 |
|
7939 | getClass(findFunction: (declaration: ClassDeclaration) => boolean): ClassDeclaration | undefined;
|
7940 | |
7941 |
|
7942 |
|
7943 |
|
7944 | getClassOrThrow(name: string): ClassDeclaration;
|
7945 | |
7946 |
|
7947 |
|
7948 |
|
7949 | getClassOrThrow(findFunction: (declaration: ClassDeclaration) => boolean): ClassDeclaration;
|
7950 | |
7951 |
|
7952 |
|
7953 |
|
7954 | addEnum(structure: EnumDeclarationStructure): EnumDeclaration;
|
7955 | |
7956 |
|
7957 |
|
7958 |
|
7959 | addEnums(structures: ReadonlyArray<EnumDeclarationStructure>): EnumDeclaration[];
|
7960 | |
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 | insertEnum(index: number, structure: EnumDeclarationStructure): EnumDeclaration;
|
7966 | |
7967 |
|
7968 |
|
7969 |
|
7970 |
|
7971 | insertEnums(index: number, structures: ReadonlyArray<EnumDeclarationStructure>): EnumDeclaration[];
|
7972 | |
7973 |
|
7974 |
|
7975 | getEnums(): EnumDeclaration[];
|
7976 | |
7977 |
|
7978 |
|
7979 |
|
7980 | getEnum(name: string): EnumDeclaration | undefined;
|
7981 | |
7982 |
|
7983 |
|
7984 |
|
7985 | getEnum(findFunction: (declaration: EnumDeclaration) => boolean): EnumDeclaration | undefined;
|
7986 | |
7987 |
|
7988 |
|
7989 |
|
7990 | getEnumOrThrow(name: string): EnumDeclaration;
|
7991 | |
7992 |
|
7993 |
|
7994 |
|
7995 | getEnumOrThrow(findFunction: (declaration: EnumDeclaration) => boolean): EnumDeclaration;
|
7996 | |
7997 |
|
7998 |
|
7999 |
|
8000 | addFunction(structure: FunctionDeclarationStructure): FunctionDeclaration;
|
8001 | |
8002 |
|
8003 |
|
8004 |
|
8005 | addFunctions(structures: ReadonlyArray<FunctionDeclarationStructure>): FunctionDeclaration[];
|
8006 | |
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 | insertFunction(index: number, structure: FunctionDeclarationStructure): FunctionDeclaration;
|
8012 | |
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 | insertFunctions(index: number, structures: ReadonlyArray<FunctionDeclarationStructure>): FunctionDeclaration[];
|
8018 | |
8019 |
|
8020 |
|
8021 | getFunctions(): FunctionDeclaration[];
|
8022 | |
8023 |
|
8024 |
|
8025 |
|
8026 | getFunction(name: string): FunctionDeclaration | undefined;
|
8027 | |
8028 |
|
8029 |
|
8030 |
|
8031 | getFunction(findFunction: (declaration: FunctionDeclaration) => boolean): FunctionDeclaration | undefined;
|
8032 | |
8033 |
|
8034 |
|
8035 |
|
8036 | getFunctionOrThrow(name: string): FunctionDeclaration;
|
8037 | |
8038 |
|
8039 |
|
8040 |
|
8041 | getFunctionOrThrow(findFunction: (declaration: FunctionDeclaration) => boolean): FunctionDeclaration;
|
8042 | |
8043 |
|
8044 |
|
8045 |
|
8046 | addInterface(structure: InterfaceDeclarationStructure): InterfaceDeclaration;
|
8047 | |
8048 |
|
8049 |
|
8050 |
|
8051 | addInterfaces(structures: ReadonlyArray<InterfaceDeclarationStructure>): InterfaceDeclaration[];
|
8052 | |
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 | insertInterface(index: number, structure: InterfaceDeclarationStructure): InterfaceDeclaration;
|
8058 | |
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 | insertInterfaces(index: number, structures: ReadonlyArray<InterfaceDeclarationStructure>): InterfaceDeclaration[];
|
8064 | |
8065 |
|
8066 |
|
8067 | getInterfaces(): InterfaceDeclaration[];
|
8068 | |
8069 |
|
8070 |
|
8071 |
|
8072 | getInterface(name: string): InterfaceDeclaration | undefined;
|
8073 | |
8074 |
|
8075 |
|
8076 |
|
8077 | getInterface(findFunction: (declaration: InterfaceDeclaration) => boolean): InterfaceDeclaration | undefined;
|
8078 | |
8079 |
|
8080 |
|
8081 |
|
8082 | getInterfaceOrThrow(name: string): InterfaceDeclaration;
|
8083 | |
8084 |
|
8085 |
|
8086 |
|
8087 | getInterfaceOrThrow(findFunction: (declaration: InterfaceDeclaration) => boolean): InterfaceDeclaration;
|
8088 | |
8089 |
|
8090 |
|
8091 |
|
8092 | addNamespace(structure: NamespaceDeclarationStructure): NamespaceDeclaration;
|
8093 | |
8094 |
|
8095 |
|
8096 |
|
8097 | addNamespaces(structures: ReadonlyArray<NamespaceDeclarationStructure>): NamespaceDeclaration[];
|
8098 | |
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 | insertNamespace(index: number, structure: NamespaceDeclarationStructure): NamespaceDeclaration;
|
8104 | |
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 | insertNamespaces(index: number, structures: ReadonlyArray<NamespaceDeclarationStructure>): NamespaceDeclaration[];
|
8110 | |
8111 |
|
8112 |
|
8113 | getNamespaces(): NamespaceDeclaration[];
|
8114 | |
8115 |
|
8116 |
|
8117 |
|
8118 | getNamespace(name: string): NamespaceDeclaration | undefined;
|
8119 | |
8120 |
|
8121 |
|
8122 |
|
8123 | getNamespace(findFunction: (declaration: NamespaceDeclaration) => boolean): NamespaceDeclaration | undefined;
|
8124 | |
8125 |
|
8126 |
|
8127 |
|
8128 | getNamespaceOrThrow(name: string): NamespaceDeclaration;
|
8129 | |
8130 |
|
8131 |
|
8132 |
|
8133 | getNamespaceOrThrow(findFunction: (declaration: NamespaceDeclaration) => boolean): NamespaceDeclaration;
|
8134 | |
8135 |
|
8136 |
|
8137 |
|
8138 | addTypeAlias(structure: TypeAliasDeclarationStructure): TypeAliasDeclaration;
|
8139 | |
8140 |
|
8141 |
|
8142 |
|
8143 | addTypeAliases(structures: ReadonlyArray<TypeAliasDeclarationStructure>): TypeAliasDeclaration[];
|
8144 | |
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 | insertTypeAlias(index: number, structure: TypeAliasDeclarationStructure): TypeAliasDeclaration;
|
8150 | |
8151 |
|
8152 |
|
8153 |
|
8154 |
|
8155 | insertTypeAliases(index: number, structures: ReadonlyArray<TypeAliasDeclarationStructure>): TypeAliasDeclaration[];
|
8156 | |
8157 |
|
8158 |
|
8159 | getTypeAliases(): TypeAliasDeclaration[];
|
8160 | |
8161 |
|
8162 |
|
8163 |
|
8164 | getTypeAlias(name: string): TypeAliasDeclaration | undefined;
|
8165 | |
8166 |
|
8167 |
|
8168 |
|
8169 | getTypeAlias(findFunction: (declaration: TypeAliasDeclaration) => boolean): TypeAliasDeclaration | undefined;
|
8170 | |
8171 |
|
8172 |
|
8173 |
|
8174 | getTypeAliasOrThrow(name: string): TypeAliasDeclaration;
|
8175 | |
8176 |
|
8177 |
|
8178 |
|
8179 | getTypeAliasOrThrow(findFunction: (declaration: TypeAliasDeclaration) => boolean): TypeAliasDeclaration;
|
8180 | |
8181 |
|
8182 |
|
8183 |
|
8184 | addVariableStatement(structure: VariableStatementStructure): VariableStatement;
|
8185 | |
8186 |
|
8187 |
|
8188 |
|
8189 | addVariableStatements(structures: ReadonlyArray<VariableStatementStructure>): VariableStatement[];
|
8190 | |
8191 |
|
8192 |
|
8193 |
|
8194 | insertVariableStatement(index: number, structure: VariableStatementStructure): VariableStatement;
|
8195 | |
8196 |
|
8197 |
|
8198 |
|
8199 | insertVariableStatements(index: number, structures: ReadonlyArray<VariableStatementStructure>): VariableStatement[];
|
8200 | |
8201 |
|
8202 |
|
8203 | getVariableStatements(): VariableStatement[];
|
8204 | |
8205 |
|
8206 |
|
8207 |
|
8208 | getVariableStatement(name: string): VariableStatement | undefined;
|
8209 | |
8210 |
|
8211 |
|
8212 |
|
8213 | getVariableStatement(findFunction: (declaration: VariableStatement) => boolean): VariableStatement | undefined;
|
8214 | |
8215 |
|
8216 |
|
8217 |
|
8218 | getVariableStatementOrThrow(name: string): VariableStatement;
|
8219 | |
8220 |
|
8221 |
|
8222 |
|
8223 | getVariableStatementOrThrow(findFunction: (declaration: VariableStatement) => boolean): VariableStatement;
|
8224 | |
8225 |
|
8226 |
|
8227 | getVariableDeclarations(): VariableDeclaration[];
|
8228 | |
8229 |
|
8230 |
|
8231 |
|
8232 | getVariableDeclaration(name: string): VariableDeclaration | undefined;
|
8233 | |
8234 |
|
8235 |
|
8236 |
|
8237 | getVariableDeclaration(findFunction: (declaration: VariableDeclaration) => boolean): VariableDeclaration | undefined;
|
8238 | |
8239 |
|
8240 |
|
8241 |
|
8242 | getVariableDeclarationOrThrow(name: string): VariableDeclaration;
|
8243 | |
8244 |
|
8245 |
|
8246 |
|
8247 | getVariableDeclarationOrThrow(findFunction: (declaration: VariableDeclaration) => boolean): VariableDeclaration;
|
8248 | }
|
8249 |
|
8250 | declare type StatementedNodeExtensionType = Node<ts.SourceFile | ts.FunctionDeclaration | ts.ModuleDeclaration | ts.FunctionLikeDeclaration | ts.CaseClause | ts.DefaultClause | ts.ModuleBlock>;
|
8251 |
|
8252 | declare const SwitchStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
8253 |
|
8254 | export declare class SwitchStatement extends SwitchStatementBase<ts.SwitchStatement> {
|
8255 | |
8256 |
|
8257 |
|
8258 | getExpression(): Expression;
|
8259 | |
8260 |
|
8261 |
|
8262 | getCaseBlock(): CaseBlock;
|
8263 | |
8264 |
|
8265 |
|
8266 | getClauses(): CaseOrDefaultClause[];
|
8267 | |
8268 |
|
8269 |
|
8270 |
|
8271 | removeClause(index: number): CaseBlock;
|
8272 | |
8273 |
|
8274 |
|
8275 |
|
8276 | removeClauses(indexRange: [number, number]): CaseBlock;
|
8277 | }
|
8278 |
|
8279 | declare const ThrowStatementBase: typeof Statement;
|
8280 |
|
8281 | export declare class ThrowStatement extends ThrowStatementBase<ts.ThrowStatement> {
|
8282 | |
8283 |
|
8284 |
|
8285 | getExpression(): Expression | undefined;
|
8286 | |
8287 |
|
8288 |
|
8289 | getExpressionOrThrow(): Expression;
|
8290 | }
|
8291 |
|
8292 | declare const TryStatementBase: typeof Statement;
|
8293 |
|
8294 | export declare class TryStatement extends TryStatementBase<ts.TryStatement> {
|
8295 | |
8296 |
|
8297 |
|
8298 | getTryBlock(): Block;
|
8299 | |
8300 |
|
8301 |
|
8302 | getCatchClause(): CatchClause | undefined;
|
8303 | |
8304 |
|
8305 |
|
8306 | getCatchClauseOrThrow(): CatchClause;
|
8307 | |
8308 |
|
8309 |
|
8310 | getFinallyBlock(): Block | undefined;
|
8311 | |
8312 |
|
8313 |
|
8314 | getFinallyBlockOrThrow(): Block;
|
8315 | }
|
8316 |
|
8317 | declare const VariableStatementBase: Constructor<ChildOrderableNode> & Constructor<NamespaceChildableNode> & Constructor<JSDocableNode> & Constructor<AmbientableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & typeof Statement;
|
8318 |
|
8319 | export declare class VariableStatement extends VariableStatementBase<ts.VariableStatement> {
|
8320 | |
8321 |
|
8322 |
|
8323 | getDeclarationList(): VariableDeclarationList;
|
8324 | |
8325 |
|
8326 |
|
8327 | getDeclarations(): VariableDeclaration[];
|
8328 | |
8329 |
|
8330 |
|
8331 | getDeclarationKind(): VariableDeclarationKind;
|
8332 | |
8333 |
|
8334 |
|
8335 | getDeclarationKindKeyword(): Node<ts.Node>;
|
8336 | |
8337 |
|
8338 |
|
8339 |
|
8340 | setDeclarationKind(type: VariableDeclarationKind): VariableDeclarationList;
|
8341 | |
8342 |
|
8343 |
|
8344 |
|
8345 | addDeclaration(structure: VariableDeclarationStructure): VariableDeclaration;
|
8346 | |
8347 |
|
8348 |
|
8349 |
|
8350 | addDeclarations(structures: ReadonlyArray<VariableDeclarationStructure>): VariableDeclaration[];
|
8351 | |
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 | insertDeclaration(index: number, structure: VariableDeclarationStructure): VariableDeclaration;
|
8357 | |
8358 |
|
8359 |
|
8360 |
|
8361 |
|
8362 | insertDeclarations(index: number, structures: ReadonlyArray<VariableDeclarationStructure>): VariableDeclaration[];
|
8363 | |
8364 |
|
8365 |
|
8366 |
|
8367 | set(structure: Partial<VariableStatementStructure>): this;
|
8368 | |
8369 |
|
8370 |
|
8371 | getStructure(): VariableStatementStructure;
|
8372 | }
|
8373 |
|
8374 | declare const WhileStatementBase: typeof IterationStatement;
|
8375 |
|
8376 | export declare class WhileStatement extends WhileStatementBase<ts.WhileStatement> {
|
8377 | |
8378 |
|
8379 |
|
8380 | getExpression(): Expression;
|
8381 | }
|
8382 |
|
8383 | declare const WithStatementBase: Constructor<ChildOrderableNode> & typeof Statement;
|
8384 |
|
8385 | export declare class WithStatement extends WithStatementBase<ts.WithStatement> {
|
8386 | |
8387 |
|
8388 |
|
8389 | getExpression(): Expression;
|
8390 | |
8391 |
|
8392 |
|
8393 | getStatement(): Statement;
|
8394 | }
|
8395 |
|
8396 | export declare class ArrayTypeNode extends TypeNode<ts.ArrayTypeNode> {
|
8397 | |
8398 |
|
8399 |
|
8400 | getElementTypeNode(): TypeNode;
|
8401 | }
|
8402 |
|
8403 | export declare class ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase<ts.ConstructorTypeNode> {
|
8404 | }
|
8405 |
|
8406 | declare const ExpressionWithTypeArgumentsBase: Constructor<LeftHandSideExpressionedNode> & typeof TypeNode;
|
8407 |
|
8408 | export declare class ExpressionWithTypeArguments extends ExpressionWithTypeArgumentsBase<ts.ExpressionWithTypeArguments> {
|
8409 | |
8410 |
|
8411 |
|
8412 | getTypeArguments(): TypeNode[];
|
8413 | }
|
8414 |
|
8415 | declare const FunctionTypeNodeBase: Constructor<TypeParameteredNode> & typeof FunctionOrConstructorTypeNodeBase;
|
8416 |
|
8417 | export declare class FunctionTypeNode extends FunctionTypeNodeBase<ts.FunctionTypeNode> {
|
8418 | }
|
8419 |
|
8420 | declare const FunctionOrConstructorTypeNodeBaseBase: Constructor<SignaturedDeclaration> & typeof TypeNode;
|
8421 |
|
8422 | export declare class FunctionOrConstructorTypeNodeBase<T extends ts.FunctionOrConstructorTypeNode = ts.FunctionOrConstructorTypeNode> extends FunctionOrConstructorTypeNodeBaseBase<T> {
|
8423 | }
|
8424 |
|
8425 | declare const ImportTypeNodeBase: Constructor<TypeArgumentedNode> & typeof TypeNode;
|
8426 |
|
8427 | export declare class ImportTypeNode extends ImportTypeNodeBase<ts.ImportTypeNode> {
|
8428 | |
8429 |
|
8430 |
|
8431 |
|
8432 | setArgument(text: string): this;
|
8433 | |
8434 |
|
8435 |
|
8436 | getArgument(): TypeNode;
|
8437 | |
8438 |
|
8439 |
|
8440 |
|
8441 | setQualifier(text: string): this;
|
8442 | |
8443 |
|
8444 |
|
8445 | getQualifierOrThrow(): EntityName;
|
8446 | |
8447 |
|
8448 |
|
8449 | getQualifier(): EntityName | undefined;
|
8450 | }
|
8451 |
|
8452 | export declare class IntersectionTypeNode extends TypeNode<ts.IntersectionTypeNode> {
|
8453 | |
8454 |
|
8455 |
|
8456 | getTypeNodes(): TypeNode[];
|
8457 | }
|
8458 |
|
8459 | export declare class LiteralTypeNode extends TypeNode<ts.LiteralTypeNode> {
|
8460 | |
8461 |
|
8462 |
|
8463 | getLiteral(): BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
|
8464 | }
|
8465 |
|
8466 | export declare class ParenthesizedTypeNode extends TypeNode<ts.ParenthesizedTypeNode> {
|
8467 | |
8468 |
|
8469 |
|
8470 | getTypeNode(): TypeNode;
|
8471 | |
8472 |
|
8473 |
|
8474 |
|
8475 | setType(textOrWriterFunction: string | WriterFunction): this;
|
8476 | }
|
8477 |
|
8478 | export declare class TupleTypeNode extends TypeNode<ts.TupleTypeNode> {
|
8479 | |
8480 |
|
8481 |
|
8482 | getElementTypeNodes(): TypeNode[];
|
8483 | }
|
8484 |
|
8485 | declare const TypeAliasDeclarationBase: Constructor<ChildOrderableNode> & Constructor<TypeParameteredNode> & Constructor<TypedNode> & Constructor<JSDocableNode> & Constructor<AmbientableNode> & Constructor<ExportableNode> & Constructor<ModifierableNode> & Constructor<NamedNode> & typeof Statement;
|
8486 |
|
8487 | export declare class TypeAliasDeclaration extends TypeAliasDeclarationBase<ts.TypeAliasDeclaration> {
|
8488 | |
8489 |
|
8490 |
|
8491 |
|
8492 | set(structure: Partial<TypeAliasDeclarationStructure>): this;
|
8493 | |
8494 |
|
8495 |
|
8496 | getStructure(): TypeAliasDeclarationStructure;
|
8497 | }
|
8498 |
|
8499 | declare const TypeLiteralNodeBase: Constructor<TypeElementMemberedNode> & typeof TypeNode;
|
8500 |
|
8501 | export declare class TypeLiteralNode extends TypeLiteralNodeBase<ts.TypeLiteralNode> {
|
8502 | }
|
8503 |
|
8504 | export declare class TypeNode<T extends ts.TypeNode = ts.TypeNode> extends Node<T> {
|
8505 | }
|
8506 |
|
8507 | declare const TypeParameterDeclarationBase: Constructor<NamedNode> & typeof Node;
|
8508 |
|
8509 | export declare class TypeParameterDeclaration extends TypeParameterDeclarationBase<ts.TypeParameterDeclaration> {
|
8510 | |
8511 |
|
8512 |
|
8513 | getConstraint(): TypeNode | undefined;
|
8514 | |
8515 |
|
8516 |
|
8517 | getConstraintOrThrow(): TypeNode<ts.TypeNode>;
|
8518 | |
8519 |
|
8520 |
|
8521 |
|
8522 | setConstraint(text: string | WriterFunction): this;
|
8523 | |
8524 |
|
8525 |
|
8526 | removeConstraint(): this;
|
8527 | |
8528 |
|
8529 |
|
8530 | getDefault(): TypeNode | undefined;
|
8531 | |
8532 |
|
8533 |
|
8534 | getDefaultOrThrow(): TypeNode<ts.TypeNode>;
|
8535 | |
8536 |
|
8537 |
|
8538 |
|
8539 | setDefault(text: string | WriterFunction): this;
|
8540 | |
8541 |
|
8542 |
|
8543 | removeDefault(): this;
|
8544 | |
8545 |
|
8546 |
|
8547 | remove(): void;
|
8548 | |
8549 |
|
8550 |
|
8551 |
|
8552 | set(structure: Partial<TypeParameterDeclarationStructure>): this;
|
8553 | |
8554 |
|
8555 |
|
8556 | getStructure(): TypeParameterDeclarationStructure;
|
8557 | }
|
8558 |
|
8559 | export declare class TypeReferenceNode extends TypeNode<ts.TypeReferenceNode> {
|
8560 | |
8561 |
|
8562 |
|
8563 | getTypeName(): EntityName;
|
8564 | |
8565 |
|
8566 |
|
8567 | getTypeArguments(): TypeNode[];
|
8568 | }
|
8569 |
|
8570 | export declare class UnionTypeNode extends TypeNode<ts.UnionTypeNode> {
|
8571 | |
8572 |
|
8573 |
|
8574 | getTypeNodes(): TypeNode[];
|
8575 | }
|
8576 |
|
8577 | declare const VariableDeclarationBase: Constructor<ExclamationTokenableNode> & Constructor<TypedNode> & Constructor<InitializerExpressionableNode> & Constructor<BindingNamedNode> & typeof Node;
|
8578 |
|
8579 | export declare class VariableDeclaration extends VariableDeclarationBase<ts.VariableDeclaration> {
|
8580 | |
8581 |
|
8582 |
|
8583 | remove(): void;
|
8584 | |
8585 |
|
8586 |
|
8587 |
|
8588 | set(structure: Partial<VariableDeclarationStructure>): this;
|
8589 | |
8590 |
|
8591 |
|
8592 | getStructure(): VariableDeclarationStructure;
|
8593 | }
|
8594 | export declare enum VariableDeclarationKind {
|
8595 | Var = "var",
|
8596 | Let = "let",
|
8597 | Const = "const"
|
8598 | }
|
8599 |
|
8600 | declare const VariableDeclarationListBase: Constructor<ModifierableNode> & typeof Node;
|
8601 |
|
8602 | export declare class VariableDeclarationList extends VariableDeclarationListBase<ts.VariableDeclarationList> {
|
8603 | |
8604 |
|
8605 |
|
8606 | getDeclarations(): VariableDeclaration[];
|
8607 | |
8608 |
|
8609 |
|
8610 | getDeclarationKind(): VariableDeclarationKind;
|
8611 | |
8612 |
|
8613 |
|
8614 | getDeclarationKindKeyword(): Node;
|
8615 | |
8616 |
|
8617 |
|
8618 |
|
8619 | setDeclarationKind(type: VariableDeclarationKind): this;
|
8620 | |
8621 |
|
8622 |
|
8623 |
|
8624 | addDeclaration(structure: VariableDeclarationStructure): VariableDeclaration;
|
8625 | |
8626 |
|
8627 |
|
8628 |
|
8629 | addDeclarations(structures: ReadonlyArray<VariableDeclarationStructure>): VariableDeclaration[];
|
8630 | |
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 | insertDeclaration(index: number, structure: VariableDeclarationStructure): VariableDeclaration;
|
8636 | |
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 | insertDeclarations(index: number, structures: ReadonlyArray<VariableDeclarationStructure>): VariableDeclaration[];
|
8642 | |
8643 |
|
8644 |
|
8645 |
|
8646 | set(structure: Partial<VariableDeclarationListStructure>): this;
|
8647 | |
8648 |
|
8649 |
|
8650 | getStructure(): VariableDeclarationListStructure;
|
8651 | }
|
8652 |
|
8653 | export declare class Signature {
|
8654 | private constructor();
|
8655 | /**
|
8656 | * Gets the underlying compiler signature.
|
8657 | */
|
8658 | readonly compilerSignature: ts.Signature;
|
8659 | /**
|
8660 | * Gets the type parameters.
|
8661 | */
|
8662 | getTypeParameters(): TypeParameter[];
|
8663 | /**
|
8664 | * Gets the parameters.
|
8665 | */
|
8666 | getParameters(): Symbol[];
|
8667 | /**
|
8668 | * Gets the signature return type.
|
8669 | */
|
8670 | getReturnType(): Type;
|
8671 | /**
|
8672 | * Get the documentation comments.
|
8673 | */
|
8674 | getDocumentationComments(): SymbolDisplayPart[];
|
8675 | /**
|
8676 | * Gets the JS doc tags.
|
8677 | */
|
8678 | getJsDocTags(): JSDocTagInfo[];
|
8679 | }
|
8680 |
|
8681 | export declare class Symbol {
|
8682 | |
8683 |
|
8684 |
|
8685 | readonly compilerSymbol: ts.Symbol;
|
8686 | private constructor();
|
8687 | /**
|
8688 | * Gets the symbol name.
|
8689 | */
|
8690 | getName(): string;
|
8691 | /**
|
8692 | * Gets the escaped name.
|
8693 | */
|
8694 | getEscapedName(): string;
|
8695 | /**
|
8696 | * Gets the aliased symbol or throws if it doesn't exist.
|
8697 | */
|
8698 | getAliasedSymbolOrThrow(): Symbol;
|
8699 | /**
|
8700 | * Gets the aliased symbol or returns undefined if it doesn't exist.
|
8701 | */
|
8702 | getAliasedSymbol(): Symbol | undefined;
|
8703 | /**
|
8704 | * Gets if the symbol is an alias.
|
8705 | */
|
8706 | isAlias(): boolean;
|
8707 | /**
|
8708 | * Gets the symbol flags.
|
8709 | */
|
8710 | getFlags(): SymbolFlags;
|
8711 | /**
|
8712 | * Gets if the symbol has the specified flags.
|
8713 | * @param flags - Flags to check if the symbol has.
|
8714 | */
|
8715 | hasFlags(flags: SymbolFlags): boolean;
|
8716 | /**
|
8717 | * Gets the value declaration of a symbol or throws if it doesn't exist.
|
8718 | */
|
8719 | getValueDeclarationOrThrow(): Node;
|
8720 | /**
|
8721 | * Gets the value declaration of the symbol or returns undefined if it doesn't exist.
|
8722 | */
|
8723 | getValueDeclaration(): Node | undefined;
|
8724 | /**
|
8725 | * Gets the symbol declarations.
|
8726 | */
|
8727 | getDeclarations(): Node[];
|
8728 | /**
|
8729 | * Gets the export of the symbol by the specified name or throws if not exists.
|
8730 | * @param name - Name of the export.
|
8731 | */
|
8732 | getExportByNameOrThrow(name: string): Symbol;
|
8733 | /**
|
8734 | * Gets the export of the symbol by the specified name or returns undefined if not exists.
|
8735 | * @param name - Name of the export.
|
8736 | */
|
8737 | getExportByName(name: string): Symbol | undefined;
|
8738 | /**
|
8739 | * Gets the exports from the symbol.
|
8740 | */
|
8741 | getExports(): Symbol[];
|
8742 | /**
|
8743 | * Gets the global export of the symbol by the specified name or throws if not exists.
|
8744 | * @param name - Name of the global export.
|
8745 | */
|
8746 | getGlobalExportByNameOrThrow(name: string): Symbol;
|
8747 | /**
|
8748 | * Gets the global export of the symbol by the specified name or returns undefined if not exists.
|
8749 | * @param name - Name of the global export.
|
8750 | */
|
8751 | getGlobalExportByName(name: string): Symbol | undefined;
|
8752 | /**
|
8753 | * Gets the global exports from the symbol.
|
8754 | */
|
8755 | getGlobalExports(): Symbol[];
|
8756 | /**
|
8757 | * Gets the member of the symbol by the specified name or throws if not exists.
|
8758 | * @param name - Name of the export.
|
8759 | */
|
8760 | getMemberByNameOrThrow(name: string): Symbol;
|
8761 | /**
|
8762 | * Gets the member of the symbol by the specified name or returns undefined if not exists.
|
8763 | * @param name - Name of the member.
|
8764 | */
|
8765 | getMemberByName(name: string): Symbol | undefined;
|
8766 | /**
|
8767 | * Gets the members of the symbol
|
8768 | */
|
8769 | getMembers(): Symbol[];
|
8770 | /**
|
8771 | * Gets the declared type of the symbol.
|
8772 | */
|
8773 | getDeclaredType(): Type;
|
8774 | /**
|
8775 | * Gets the type of the symbol at a location.
|
8776 | * @param node - Location to get the type at for this symbol.
|
8777 | */
|
8778 | getTypeAtLocation(node: Node): Type<ts.Type>;
|
8779 | /**
|
8780 | * Gets the fully qualified name.
|
8781 | */
|
8782 | getFullyQualifiedName(): string;
|
8783 | }
|
8784 |
|
8785 | export interface FormatCodeSettings extends ts.FormatCodeSettings {
|
8786 | ensureNewLineAtEndOfFile?: boolean;
|
8787 | }
|
8788 |
|
8789 |
|
8790 |
|
8791 | export interface RenameOptions {
|
8792 | |
8793 |
|
8794 |
|
8795 |
|
8796 | renameInComments?: boolean;
|
8797 | |
8798 |
|
8799 |
|
8800 |
|
8801 | renameInStrings?: boolean;
|
8802 | }
|
8803 |
|
8804 |
|
8805 |
|
8806 |
|
8807 | export interface UserPreferences extends ts.UserPreferences {
|
8808 | }
|
8809 |
|
8810 | export declare class LanguageService {
|
8811 | private readonly _compilerObject;
|
8812 | private readonly _compilerHost;
|
8813 | private _program;
|
8814 | |
8815 |
|
8816 |
|
8817 | readonly compilerObject: ts.LanguageService;
|
8818 | private constructor();
|
8819 | /**
|
8820 | * Gets the language service's program.
|
8821 | */
|
8822 | getProgram(): Program;
|
8823 | /**
|
8824 | * Rename the specified node.
|
8825 | * @param node - Node to rename.
|
8826 | * @param newName - New name for the node.
|
8827 | * @param options - Options for renaming the node.
|
8828 | */
|
8829 | renameNode(node: Node, newName: string, options?: RenameOptions): void;
|
8830 | /**
|
8831 | * Rename the provided rename locations.
|
8832 | * @param renameLocations - Rename locations.
|
8833 | * @param newName - New name for the node.
|
8834 | */
|
8835 | renameLocations(renameLocations: ReadonlyArray<RenameLocation>, newName: string): void;
|
8836 | /**
|
8837 | * Gets the definitions for the specified node.
|
8838 | * @param node - Node.
|
8839 | */
|
8840 | getDefinitions(node: Node): DefinitionInfo[];
|
8841 | /**
|
8842 | * Gets the definitions at the specified position.
|
8843 | * @param sourceFile - Source file.
|
8844 | * @param pos - Position.
|
8845 | */
|
8846 | getDefinitionsAtPosition(sourceFile: SourceFile, pos: number): DefinitionInfo[];
|
8847 | /**
|
8848 | * Gets the implementations for the specified node.
|
8849 | * @param node - Node.
|
8850 | */
|
8851 | getImplementations(node: Node): ImplementationLocation[];
|
8852 | /**
|
8853 | * Gets the implementations at the specified position.
|
8854 | * @param sourceFile - Source file.
|
8855 | * @param pos - Position.
|
8856 | */
|
8857 | getImplementationsAtPosition(sourceFile: SourceFile, pos: number): ImplementationLocation[];
|
8858 | /**
|
8859 | * Finds references based on the specified node.
|
8860 | * @param node - Node to find references for.
|
8861 | */
|
8862 | findReferences(node: Node): ReferencedSymbol[];
|
8863 | /**
|
8864 | * Finds the nodes that reference the definition(s) of the specified node.
|
8865 | * @param node - Node.
|
8866 | */
|
8867 | findReferencesAsNodes(node: Node): Node<ts.Node>[];
|
8868 | /**
|
8869 | * Finds references based on the specified position.
|
8870 | * @param sourceFile - Source file.
|
8871 | * @param pos - Position to find the reference at.
|
8872 | */
|
8873 | findReferencesAtPosition(sourceFile: SourceFile, pos: number): ReferencedSymbol[];
|
8874 | /**
|
8875 | * Find the rename locations for the specified node.
|
8876 | * @param node - Node to get the rename locations for.
|
8877 | * @param options - Options for renaming.
|
8878 | */
|
8879 | findRenameLocations(node: Node, options?: RenameOptions): RenameLocation[];
|
8880 | /**
|
8881 | * Gets the suggestion diagnostics.
|
8882 | * @param filePathOrSourceFile - The source file or file path to get suggestions for.
|
8883 | */
|
8884 | getSuggestionDiagnostics(filePathOrSourceFile: SourceFile | string): DiagnosticWithLocation[];
|
8885 | /**
|
8886 | * Gets the formatting edits for a range.
|
8887 | * @param filePath - File path.
|
8888 | * @param range - Position range.
|
8889 | * @param formatSettings - Format code settings.
|
8890 | */
|
8891 | getFormattingEditsForRange(filePath: string, range: [number, number], formatSettings: FormatCodeSettings): TextChange[];
|
8892 | /**
|
8893 | * Gets the formatting edits for a document.
|
8894 | * @param filePath - File path of the source file.
|
8895 | * @param formatSettings - Format code settings.
|
8896 | */
|
8897 | getFormattingEditsForDocument(filePath: string, formatSettings: FormatCodeSettings): TextChange[];
|
8898 | /**
|
8899 | * Gets the formatted text for a document.
|
8900 | * @param filePath - File path of the source file.
|
8901 | * @param formatSettings - Format code settings.
|
8902 | */
|
8903 | getFormattedDocumentText(filePath: string, formatSettings: FormatCodeSettings): string;
|
8904 | /**
|
8905 | * Gets the emit output of a source file.
|
8906 | * @param sourceFile - Source file.
|
8907 | * @param emitOnlyDtsFiles - Whether to only emit the d.ts files.
|
8908 | */
|
8909 | getEmitOutput(sourceFile: SourceFile, emitOnlyDtsFiles?: boolean): EmitOutput;
|
8910 | /**
|
8911 | * Gets the emit output of a source file.
|
8912 | * @param filePath - File path.
|
8913 | * @param emitOnlyDtsFiles - Whether to only emit the d.ts files.
|
8914 | */
|
8915 | getEmitOutput(filePath: string, emitOnlyDtsFiles?: boolean): EmitOutput;
|
8916 | /**
|
8917 | * Gets the indentation at the specified position.
|
8918 | * @param sourceFile - Source file.
|
8919 | * @param position - Position.
|
8920 | * @param settings - Editor settings.
|
8921 | */
|
8922 | getIdentationAtPosition(sourceFile: SourceFile, position: number, settings?: EditorSettings): number;
|
8923 | /**
|
8924 | * Gets the indentation at the specified position.
|
8925 | * @param filePath - File path.
|
8926 | * @param position - Position.
|
8927 | * @param settings - Editor settings.
|
8928 | */
|
8929 | getIdentationAtPosition(filePath: string, position: number, settings?: EditorSettings): number;
|
8930 | /**
|
8931 | * Gets the file text changes for organizing the imports in a source file.
|
8932 | *
|
8933 | * @param sourceFile - Source file.
|
8934 | * @param formatSettings - Format code settings.
|
8935 | * @param userPreferences - User preferences for refactoring.
|
8936 | */
|
8937 | organizeImports(sourceFile: SourceFile, formatSettings?: FormatCodeSettings, userPreferences?: UserPreferences): FileTextChanges[];
|
8938 | /**
|
8939 | * Gets the file text changes for organizing the imports in a source file.
|
8940 | *
|
8941 | * @param filePath - File path of the source file.
|
8942 | * @param formatSettings - Format code settings.
|
8943 | * @param userPreferences - User preferences for refactoring.
|
8944 | */
|
8945 | organizeImports(filePath: string, formatSettings?: FormatCodeSettings, userPreferences?: UserPreferences): FileTextChanges[];
|
8946 | /**
|
8947 | * Gets the edit information for applying a refactor at a the provided position in a source file.
|
8948 | * @param filePathOrSourceFile - File path or source file to get the edits for.
|
8949 | * @param formatSettings - Fomat code settings.
|
8950 | * @param positionOrRange - Position in the source file where to apply given refactor.
|
8951 | * @param refactorName - Refactor name.
|
8952 | * @param actionName - Refactor action name.
|
8953 | * @param preferences - User preferences for refactoring.
|
8954 | */
|
8955 | getEditsForRefactor(filePathOrSourceFile: string | SourceFile, formatSettings: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences?: UserPreferences): RefactorEditInfo | undefined;
|
8956 | /**
|
8957 | * Gets file changes and actions to perform for the provided fixId.
|
8958 | * @param filePathOrSourceFile - File path or source file to get the combined code fixes for.
|
8959 | * @param fixId - Identifier for the code fix (ex. "fixMissingImport"). These ids are found in the `ts.codefix` namespace in the compiler api source.
|
8960 | * @param formatSettings - Format code settings.
|
8961 | * @param preferences - User preferences for refactoring.
|
8962 | */
|
8963 | getCombinedCodeFix(filePathOrSourceFile: string | SourceFile, fixId: {}, formatSettings?: FormatCodeSettings, preferences?: UserPreferences): CombinedCodeActions;
|
8964 | /**
|
8965 | * Gets the edit information for applying a code fix at the provided text range in a source file.
|
8966 | * @param filePathOrSourceFile - File path or source file to get the code fixes for.
|
8967 | * @param start - Start position of the text range to be fixed.
|
8968 | * @param end - End position of the text range to be fixed.
|
8969 | * @param errorCodes - One or more error codes associated with the code fixes to retrieve.
|
8970 | * @param formatOptions - Format code settings.
|
8971 | * @param preferences - User preferences for refactoring.
|
8972 | */
|
8973 | getCodeFixesAtPosition(filePathOrSourceFile: string | SourceFile, start: number, end: number, errorCodes: ReadonlyArray<number>, formatOptions?: FormatCodeSettings, preferences?: UserPreferences): CodeFixAction[];
|
8974 | private _getFilePathFromFilePathOrSourceFile;
|
8975 | private _getFilledSettings;
|
8976 | private _getFilledUserPreferences;
|
8977 | }
|
8978 |
|
8979 | /**
|
8980 | * Options for emitting from a Program.
|
8981 | */
|
8982 | export interface ProgramEmitOptions extends EmitOptions {
|
8983 | writeFile?: ts.WriteFileCallback;
|
8984 | }
|
8985 |
|
8986 |
|
8987 |
|
8988 |
|
8989 | export interface EmitOptions extends EmitOptionsBase {
|
8990 | |
8991 |
|
8992 |
|
8993 | targetSourceFile?: SourceFile;
|
8994 | }
|
8995 |
|
8996 | export interface EmitOptionsBase {
|
8997 | |
8998 |
|
8999 |
|
9000 | emitOnlyDtsFiles?: boolean;
|
9001 | |
9002 |
|
9003 |
|
9004 | customTransformers?: ts.CustomTransformers;
|
9005 | }
|
9006 |
|
9007 |
|
9008 |
|
9009 |
|
9010 | export declare class Program {
|
9011 | private constructor();
|
9012 | /**
|
9013 | * Gets the underlying compiler program.
|
9014 | */
|
9015 | readonly compilerObject: ts.Program;
|
9016 | /**
|
9017 | * Get the program's type checker.
|
9018 | */
|
9019 | getTypeChecker(): TypeChecker;
|
9020 | /**
|
9021 | * Emits the TypeScript files to JavaScript files.
|
9022 | * @param options - Options for emitting.
|
9023 | */
|
9024 | emit(options?: ProgramEmitOptions): EmitResult;
|
9025 | /**
|
9026 | * Emits the TypeScript files to JavaScript files to memory.
|
9027 | * @param options - Options for emitting.
|
9028 | */
|
9029 | emitToMemory(options?: EmitOptions): MemoryEmitResult;
|
9030 | /**
|
9031 | * Gets the syntactic diagnostics.
|
9032 | * @param sourceFile - Optional source file to filter by.
|
9033 | */
|
9034 | getSyntacticDiagnostics(sourceFile?: SourceFile): DiagnosticWithLocation[];
|
9035 | /**
|
9036 | * Gets the semantic diagnostics.
|
9037 | * @param sourceFile - Optional source file to filter by.
|
9038 | */
|
9039 | getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
|
9040 | /**
|
9041 | * Gets the declaration diagnostics.
|
9042 | * @param sourceFile - Optional source file to filter by.
|
9043 | */
|
9044 | getDeclarationDiagnostics(sourceFile?: SourceFile): DiagnosticWithLocation[];
|
9045 | /**
|
9046 | * Gets the global diagnostics.
|
9047 | */
|
9048 | getGlobalDiagnostics(): Diagnostic[];
|
9049 | /**
|
9050 | * Gets the emit module resolution kind.
|
9051 | */
|
9052 | getEmitModuleResolutionKind(): ModuleResolutionKind;
|
9053 | /**
|
9054 | * Gets if the provided source file was discovered while loading an external library.
|
9055 | * @param sourceFile - Source file.
|
9056 | */
|
9057 | isSourceFileFromExternalLibrary(sourceFile: SourceFile): boolean;
|
9058 | }
|
9059 |
|
9060 | /**
|
9061 | * Represents a code action.
|
9062 | */
|
9063 | export declare class CodeAction<TCompilerObject extends ts.CodeAction = ts.CodeAction> {
|
9064 | protected constructor();
|
9065 | /** Gets the compiler object. */
|
9066 | readonly compilerObject: TCompilerObject;
|
9067 | /** Description of the code action. */
|
9068 | getDescription(): string;
|
9069 | /** Text changes to apply to each file as part of the code action. */
|
9070 | getChanges(): FileTextChanges[];
|
9071 | }
|
9072 |
|
9073 | /**
|
9074 | * Represents file changes.
|
9075 | *
|
9076 | * Commands are currently not implemented.
|
9077 | */
|
9078 | export declare class CombinedCodeActions {
|
9079 | private constructor();
|
9080 | /** Gets the compiler object. */
|
9081 | readonly compilerObject: ts.CombinedCodeActions;
|
9082 | /** Text changes to apply to each file. */
|
9083 | getChanges(): FileTextChanges[];
|
9084 | }
|
9085 |
|
9086 | /**
|
9087 | * Represents a code fix action.
|
9088 | */
|
9089 | export declare class CodeFixAction extends CodeAction<ts.CodeFixAction> {
|
9090 | |
9091 |
|
9092 |
|
9093 | getFixName(): string;
|
9094 | |
9095 |
|
9096 |
|
9097 |
|
9098 | getFixId(): {} | undefined;
|
9099 | |
9100 |
|
9101 |
|
9102 | getFixAllDescription(): string | undefined;
|
9103 | }
|
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 | export declare class DefinitionInfo<TCompilerObject extends ts.DefinitionInfo = ts.DefinitionInfo> extends DocumentSpan<TCompilerObject> {
|
9109 | protected constructor();
|
9110 | /**
|
9111 | * Gets the kind.
|
9112 | */
|
9113 | getKind(): ts.ScriptElementKind;
|
9114 | /**
|
9115 | * Gets the name.
|
9116 | */
|
9117 | getName(): string;
|
9118 | /**
|
9119 | * Gets the container kind.
|
9120 | */
|
9121 | getContainerKind(): ts.ScriptElementKind;
|
9122 | /**
|
9123 | * Gets the container name.
|
9124 | */
|
9125 | getContainerName(): string;
|
9126 | /**
|
9127 | * Gets the declaration node.
|
9128 | */
|
9129 | getDeclarationNode(): Node | undefined;
|
9130 | }
|
9131 |
|
9132 | /**
|
9133 | * Diagnostic.
|
9134 | */
|
9135 | export declare class Diagnostic<TCompilerObject extends ts.Diagnostic = ts.Diagnostic> {
|
9136 | protected constructor();
|
9137 | /**
|
9138 | * Gets the underlying compiler diagnostic.
|
9139 | */
|
9140 | readonly compilerObject: TCompilerObject;
|
9141 | /**
|
9142 | * Gets the source file.
|
9143 | */
|
9144 | getSourceFile(): SourceFile | undefined;
|
9145 | /**
|
9146 | * Gets the message text.
|
9147 | */
|
9148 | getMessageText(): string | DiagnosticMessageChain;
|
9149 | /**
|
9150 | * Gets the line number.
|
9151 | */
|
9152 | getLineNumber(): number | undefined;
|
9153 | /**
|
9154 | * Gets the start.
|
9155 | */
|
9156 | getStart(): number | undefined;
|
9157 | /**
|
9158 | * Gets the length.
|
9159 | */
|
9160 | getLength(): number | undefined;
|
9161 | /**
|
9162 | * Gets the diagnostic category.
|
9163 | */
|
9164 | getCategory(): DiagnosticCategory;
|
9165 | /**
|
9166 | * Gets the code of the diagnostic.
|
9167 | */
|
9168 | getCode(): number;
|
9169 | /**
|
9170 | * Gets the source.
|
9171 | */
|
9172 | getSource(): string | undefined;
|
9173 | }
|
9174 |
|
9175 | /**
|
9176 | * Diagnostic message chain.
|
9177 | */
|
9178 | export declare class DiagnosticMessageChain {
|
9179 | private constructor();
|
9180 | /**
|
9181 | * Gets the underlying compiler object.
|
9182 | */
|
9183 | readonly compilerObject: ts.DiagnosticMessageChain;
|
9184 | /**
|
9185 | * Gets the message text.
|
9186 | */
|
9187 | getMessageText(): string;
|
9188 | /**
|
9189 | * Gets th enext diagnostic message chain in the chain.
|
9190 | */
|
9191 | getNext(): DiagnosticMessageChain | undefined;
|
9192 | /**
|
9193 | * Gets the code of the diagnostic message chain.
|
9194 | */
|
9195 | getCode(): number;
|
9196 | /**
|
9197 | * Gets the category of the diagnostic message chain.
|
9198 | */
|
9199 | getCategory(): DiagnosticCategory;
|
9200 | }
|
9201 |
|
9202 | export declare class DiagnosticWithLocation extends Diagnostic<ts.DiagnosticWithLocation> {
|
9203 | private constructor();
|
9204 | /**
|
9205 | * Gets the line number.
|
9206 | */
|
9207 | getLineNumber(): number;
|
9208 | /**
|
9209 | * Gets the start.
|
9210 | */
|
9211 | getStart(): number;
|
9212 | /**
|
9213 | * Gets the length
|
9214 | */
|
9215 | getLength(): number;
|
9216 | /**
|
9217 | * Gets the source file.
|
9218 | */
|
9219 | getSourceFile(): SourceFile;
|
9220 | }
|
9221 |
|
9222 | /**
|
9223 | * Document span.
|
9224 | */
|
9225 | export declare class DocumentSpan<TCompilerObject extends ts.DocumentSpan = ts.DocumentSpan> {
|
9226 | protected constructor();
|
9227 | /**
|
9228 | * Gets the compiler object.
|
9229 | */
|
9230 | readonly compilerObject: TCompilerObject;
|
9231 | /**
|
9232 | * Gets the source file this reference is in.
|
9233 | */
|
9234 | getSourceFile(): SourceFile;
|
9235 | /**
|
9236 | * Gets the text span.
|
9237 | */
|
9238 | getTextSpan(): TextSpan;
|
9239 | /**
|
9240 | * Gets the node at the start of the text span.
|
9241 | */
|
9242 | getNode(): Node<ts.Node>;
|
9243 | /**
|
9244 | * Gets the original text span if the span represents a location that was remapped.
|
9245 | */
|
9246 | getOriginalTextSpan(): TextSpan | undefined;
|
9247 | /**
|
9248 | * Gets the original file name if the span represents a location that was remapped.
|
9249 | */
|
9250 | getOriginalFileName(): string | undefined;
|
9251 | }
|
9252 |
|
9253 | /**
|
9254 | * Output of an emit on a single file.
|
9255 | */
|
9256 | export declare class EmitOutput {
|
9257 | private readonly _filePath;
|
9258 | private constructor();
|
9259 | /**
|
9260 | * TypeScript compiler emit result.
|
9261 | */
|
9262 | readonly compilerObject: ts.EmitOutput;
|
9263 | /**
|
9264 | * Gets if the emit was skipped.
|
9265 | */
|
9266 | getEmitSkipped(): boolean;
|
9267 | /**
|
9268 | * Gets the output files.
|
9269 | */
|
9270 | getOutputFiles(): OutputFile[];
|
9271 | }
|
9272 |
|
9273 | /**
|
9274 | * Result of an emit.
|
9275 | */
|
9276 | export declare class EmitResult {
|
9277 | protected constructor();
|
9278 | /**
|
9279 | * TypeScript compiler emit result.
|
9280 | */
|
9281 | readonly compilerObject: ts.EmitResult;
|
9282 | /**
|
9283 | * If the emit was skipped.
|
9284 | */
|
9285 | getEmitSkipped(): boolean;
|
9286 | /**
|
9287 | * Contains declaration emit diagnostics.
|
9288 | *
|
9289 | * This is the semantic, syntactic, global, options, and if enabled declaration diagnostics.
|
9290 | */
|
9291 | getDiagnostics(): Diagnostic<ts.Diagnostic>[];
|
9292 | }
|
9293 |
|
9294 | /**
|
9295 | * The emitted file in memory.
|
9296 | */
|
9297 | export interface MemoryEmitResultFile {
|
9298 | |
9299 |
|
9300 |
|
9301 | filePath: string;
|
9302 | |
9303 |
|
9304 |
|
9305 | text: string;
|
9306 | |
9307 |
|
9308 |
|
9309 | writeByteOrderMark: boolean;
|
9310 | }
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 | export declare class MemoryEmitResult extends EmitResult {
|
9316 | private readonly _files;
|
9317 | private constructor();
|
9318 | /**
|
9319 | * Gets the files that were emitted to memory.
|
9320 | */
|
9321 | getFiles(): MemoryEmitResultFile[];
|
9322 | }
|
9323 |
|
9324 | export declare class FileTextChanges {
|
9325 | private constructor();
|
9326 | /**
|
9327 | * Gets the file path.
|
9328 | */
|
9329 | getFilePath(): string;
|
9330 | /**
|
9331 | * Gets the source file if it was in the cache at the time of this class' creation.
|
9332 | */
|
9333 | getSourceFile(): SourceFile | undefined;
|
9334 | /**
|
9335 | * Gets the text changes
|
9336 | */
|
9337 | getTextChanges(): TextChange[];
|
9338 | /**
|
9339 | * Gets if this change is for creating a new file.
|
9340 | */
|
9341 | isNewFile(): boolean;
|
9342 | }
|
9343 |
|
9344 | export declare class ImplementationLocation extends DocumentSpan<ts.ImplementationLocation> {
|
9345 | private constructor();
|
9346 | /**
|
9347 | * Gets the kind.
|
9348 | */
|
9349 | getKind(): ts.ScriptElementKind;
|
9350 | /**
|
9351 | * Gets the display parts.
|
9352 | */
|
9353 | getDisplayParts(): SymbolDisplayPart[];
|
9354 | }
|
9355 |
|
9356 | /**
|
9357 | * Output file of an emit.
|
9358 | */
|
9359 | export declare class OutputFile {
|
9360 | private constructor();
|
9361 | /**
|
9362 | * TypeScript compiler output file.
|
9363 | */
|
9364 | readonly compilerObject: ts.OutputFile;
|
9365 | /**
|
9366 | * Gets the file path.
|
9367 | */
|
9368 | getFilePath(): string;
|
9369 | /**
|
9370 | * Gets whether the byte order mark should be written.
|
9371 | */
|
9372 | getWriteByteOrderMark(): boolean;
|
9373 | /**
|
9374 | * Gets the file text.
|
9375 | */
|
9376 | getText(): string;
|
9377 | }
|
9378 |
|
9379 | /**
|
9380 | * Set of edits to make in response to a refactor action, plus an optional location where renaming should be invoked from.
|
9381 | */
|
9382 | export declare class RefactorEditInfo {
|
9383 | private constructor();
|
9384 | /** Gets the compiler refactor edit info. */
|
9385 | readonly compilerObject: ts.RefactorEditInfo;
|
9386 | /**
|
9387 | * Gets refactor file text changes
|
9388 | */
|
9389 | getEdits(): FileTextChanges[];
|
9390 | /**
|
9391 | * Gets the file path for a rename refactor.
|
9392 | */
|
9393 | getRenameFilePath(): string | undefined;
|
9394 | /**
|
9395 | * Location where renaming should be invoked from.
|
9396 | */
|
9397 | getRenameLocation(): number | undefined;
|
9398 | }
|
9399 |
|
9400 | /**
|
9401 | * Referenced symbol.
|
9402 | */
|
9403 | export declare class ReferencedSymbol {
|
9404 | private constructor();
|
9405 | /**
|
9406 | * Gets the compiler referenced symbol.
|
9407 | */
|
9408 | readonly compilerObject: ts.ReferencedSymbol;
|
9409 | /**
|
9410 | * Gets the definition.
|
9411 | */
|
9412 | getDefinition(): ReferencedSymbolDefinitionInfo;
|
9413 | /**
|
9414 | * Gets the references.
|
9415 | */
|
9416 | getReferences(): ReferenceEntry[];
|
9417 | }
|
9418 |
|
9419 | export declare class ReferencedSymbolDefinitionInfo extends DefinitionInfo<ts.ReferencedSymbolDefinitionInfo> {
|
9420 | private constructor();
|
9421 | /**
|
9422 | * Gets the display parts.
|
9423 | */
|
9424 | getDisplayParts(): SymbolDisplayPart[];
|
9425 | }
|
9426 |
|
9427 | export declare class ReferenceEntry extends DocumentSpan<ts.ReferenceEntry> {
|
9428 | private constructor();
|
9429 | isWriteAccess(): boolean;
|
9430 | /**
|
9431 | * If this is the definition reference.
|
9432 | */
|
9433 | isDefinition(): boolean;
|
9434 | isInString(): true | undefined;
|
9435 | }
|
9436 |
|
9437 | /**
|
9438 | * Rename location.
|
9439 | */
|
9440 | export declare class RenameLocation extends DocumentSpan<ts.RenameLocation> {
|
9441 | }
|
9442 |
|
9443 |
|
9444 |
|
9445 |
|
9446 | export declare class SymbolDisplayPart {
|
9447 | private constructor();
|
9448 | /** Gets the compiler symbol display part. */
|
9449 | readonly compilerObject: ts.SymbolDisplayPart;
|
9450 | /**
|
9451 | * Gets the text.
|
9452 | */
|
9453 | getText(): string;
|
9454 | /**
|
9455 | * Gets the kind.
|
9456 | *
|
9457 | * Examples: "text", "lineBreak"
|
9458 | */
|
9459 | getKind(): string;
|
9460 | }
|
9461 |
|
9462 | /**
|
9463 | * Represents a text change.
|
9464 | */
|
9465 | export declare class TextChange {
|
9466 | private constructor();
|
9467 | /** Gets the compiler text change. */
|
9468 | readonly compilerObject: ts.TextChange;
|
9469 | /**
|
9470 | * Gets the text span.
|
9471 | */
|
9472 | getSpan(): TextSpan;
|
9473 | /**
|
9474 | * Gets the new text.
|
9475 | */
|
9476 | getNewText(): string;
|
9477 | }
|
9478 |
|
9479 | /**
|
9480 | * Represents a span of text.
|
9481 | */
|
9482 | export declare class TextSpan {
|
9483 | private constructor();
|
9484 | /** Gets the compiler text span. */
|
9485 | readonly compilerObject: ts.TextSpan;
|
9486 | /**
|
9487 | * Gets the start.
|
9488 | */
|
9489 | getStart(): number;
|
9490 | /**
|
9491 | * Gets the start + length.
|
9492 | */
|
9493 | getEnd(): number;
|
9494 | /**
|
9495 | * Gets the length.
|
9496 | */
|
9497 | getLength(): number;
|
9498 | }
|
9499 |
|
9500 | /**
|
9501 | * Wrapper around the TypeChecker.
|
9502 | */
|
9503 | export declare class TypeChecker {
|
9504 | private constructor();
|
9505 | /**
|
9506 | * Gets the compiler's TypeChecker.
|
9507 | */
|
9508 | readonly compilerObject: ts.TypeChecker;
|
9509 | /**
|
9510 | * Gets the ambient module symbols (ex. modules in the @types folder or node_modules).
|
9511 | */
|
9512 | getAmbientModules(): Symbol[];
|
9513 | /**
|
9514 | * Gets the apparent type of a type.
|
9515 | * @param type - Type to get the apparent type of.
|
9516 | */
|
9517 | getApparentType(type: Type): Type<ts.Type>;
|
9518 | /**
|
9519 | * Gets the constant value of a declaration.
|
9520 | * @param node - Node to get the constant value from.
|
9521 | */
|
9522 | getConstantValue(node: EnumMember): string | number | undefined;
|
9523 | /**
|
9524 | * Gets the fully qualified name of a symbol.
|
9525 | * @param symbol - Symbol to get the fully qualified name of.
|
9526 | */
|
9527 | getFullyQualifiedName(symbol: Symbol): string;
|
9528 | /**
|
9529 | * Gets the type at the specified location.
|
9530 | * @param node - Node to get the type for.
|
9531 | */
|
9532 | getTypeAtLocation(node: Node): Type;
|
9533 | /**
|
9534 | * Gets the contextual type of an expression.
|
9535 | * @param expression - Expression.
|
9536 | */
|
9537 | getContextualType(expression: Expression): Type | undefined;
|
9538 | /**
|
9539 | * Gets the type of a symbol at the specified location.
|
9540 | * @param symbol - Symbol to get the type for.
|
9541 | * @param node - Location to get the type for.
|
9542 | */
|
9543 | getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
9544 | /**
|
9545 | * Gets the declared type of a symbol.
|
9546 | * @param symbol - Symbol to get the type for.
|
9547 | */
|
9548 | getDeclaredTypeOfSymbol(symbol: Symbol): Type;
|
9549 | /**
|
9550 | * Gets the symbol at the specified location or undefined if none exists.
|
9551 | * @param node - Node to get the symbol for.
|
9552 | */
|
9553 | getSymbolAtLocation(node: Node): Symbol | undefined;
|
9554 | /**
|
9555 | * Gets the aliased symbol of a symbol.
|
9556 | * @param symbol - Symbol to get the alias symbol of.
|
9557 | */
|
9558 | getAliasedSymbol(symbol: Symbol): Symbol | undefined;
|
9559 | /**
|
9560 | * Gets the properties of a type.
|
9561 | * @param type - Type.
|
9562 | */
|
9563 | getPropertiesOfType(type: Type): Symbol[];
|
9564 | /**
|
9565 | * Gets the type text
|
9566 | * @param type - Type to get the text of.
|
9567 | * @param enclosingNode - Enclosing node.
|
9568 | * @param typeFormatFlags - Type format flags.
|
9569 | */
|
9570 | getTypeText(type: Type, enclosingNode?: Node, typeFormatFlags?: TypeFormatFlags): string;
|
9571 | /**
|
9572 | * Gets the return type of a signature.
|
9573 | * @param signature - Signature to get the return type of.
|
9574 | */
|
9575 | getReturnTypeOfSignature(signature: Signature): Type;
|
9576 | /**
|
9577 | * Gets a signature from a node.
|
9578 | * @param node - Node to get the signature from.
|
9579 | */
|
9580 | getSignatureFromNode(node: Node<ts.SignatureDeclaration>): Signature | undefined;
|
9581 | /**
|
9582 | * Gets the exports of a module.
|
9583 | * @param moduleSymbol - Module symbol.
|
9584 | */
|
9585 | getExportsOfModule(moduleSymbol: Symbol): Symbol[];
|
9586 | /**
|
9587 | * Gets the local target symbol of the provided export specifier.
|
9588 | * @param exportSpecifier - Export specifier.
|
9589 | */
|
9590 | getExportSpecifierLocalTargetSymbol(exportSpecifier: ExportSpecifier): Symbol | undefined;
|
9591 | /**
|
9592 | * Gets the base type of a literal type.
|
9593 | *
|
9594 | * For example, for a number literal type it will return the number type.
|
9595 | * @param type - Literal type to get the base type of.
|
9596 | */
|
9597 | getBaseTypeOfLiteralType(type: Type): Type<ts.Type>;
|
9598 | private _getDefaultTypeFormatFlags;
|
9599 | }
|
9600 |
|
9601 | export declare class Type<TType extends ts.Type = ts.Type> {
|
9602 | |
9603 |
|
9604 |
|
9605 | readonly compilerType: TType;
|
9606 | protected constructor();
|
9607 | /**
|
9608 | * Gets the type text.
|
9609 | * @param enclosingNode - The enclosing node.
|
9610 | * @param typeFormatFlags - Format flags for the type text.
|
9611 | */
|
9612 | getText(enclosingNode?: Node, typeFormatFlags?: TypeFormatFlags): string;
|
9613 | /**
|
9614 | * Gets the alias symbol if it exists.
|
9615 | */
|
9616 | getAliasSymbol(): Symbol | undefined;
|
9617 | /**
|
9618 | * Gets the alias symbol if it exists, or throws.
|
9619 | */
|
9620 | getAliasSymbolOrThrow(): Symbol;
|
9621 | /**
|
9622 | * Gets the alias type arguments.
|
9623 | */
|
9624 | getAliasTypeArguments(): Type[];
|
9625 | /**
|
9626 | * Gets the apparent type.
|
9627 | */
|
9628 | getApparentType(): Type;
|
9629 | /**
|
9630 | * Gets the array type
|
9631 | */
|
9632 | getArrayType(): Type<ts.Type> | undefined;
|
9633 | /**
|
9634 | * Gets the base types.
|
9635 | */
|
9636 | getBaseTypes(): Type<ts.BaseType>[];
|
9637 | /**
|
9638 | * Gets the base type of a literal type.
|
9639 | *
|
9640 | * For example, for a number literal type it will return the number type.
|
9641 | */
|
9642 | getBaseTypeOfLiteralType(): Type<ts.Type>;
|
9643 | /**
|
9644 | * Gets the call signatures.
|
9645 | */
|
9646 | getCallSignatures(): Signature[];
|
9647 | /**
|
9648 | * Gets the construct signatures.
|
9649 | */
|
9650 | getConstructSignatures(): Signature[];
|
9651 | /**
|
9652 | * Gets the constraint or throws if it doesn't exist.
|
9653 | */
|
9654 | getConstraintOrThrow(): Type<ts.Type>;
|
9655 | /**
|
9656 | * Gets the constraint or returns undefined if it doesn't exist.
|
9657 | */
|
9658 | getConstraint(): Type<ts.Type> | undefined;
|
9659 | /**
|
9660 | * Gets the default type or throws if it doesn't exist.
|
9661 | */
|
9662 | getDefaultOrThrow(): Type<ts.Type>;
|
9663 | /**
|
9664 | * Gets the default type or returns undefined if it doesn't exist.
|
9665 | */
|
9666 | getDefault(): Type<ts.Type> | undefined;
|
9667 | /**
|
9668 | * Gets the properties of the type.
|
9669 | */
|
9670 | getProperties(): Symbol[];
|
9671 | /**
|
9672 | * Gets a property.
|
9673 | * @param name - By a name.
|
9674 | * @param findFunction - Function for searching for a property.
|
9675 | */
|
9676 | getProperty(name: string): Symbol | undefined;
|
9677 | getProperty(findFunction: (declaration: Symbol) => boolean): Symbol | undefined;
|
9678 | /**
|
9679 | * Gets the apparent properties of the type.
|
9680 | */
|
9681 | getApparentProperties(): Symbol[];
|
9682 | /**
|
9683 | * Gets an apparent property.
|
9684 | * @param name - By a name.
|
9685 | * @param findFunction - Function for searching for an apparent property.
|
9686 | */
|
9687 | getApparentProperty(name: string): Symbol | undefined;
|
9688 | getApparentProperty(findFunction: (declaration: Symbol) => boolean): Symbol | undefined;
|
9689 | /**
|
9690 | * Gets if the type is possibly null or undefined.
|
9691 | */
|
9692 | isNullable(): boolean;
|
9693 | /**
|
9694 | * Gets the non-nullable type.
|
9695 | */
|
9696 | getNonNullableType(): Type;
|
9697 | /**
|
9698 | * Gets the number index type.
|
9699 | */
|
9700 | getNumberIndexType(): Type | undefined;
|
9701 | /**
|
9702 | * Gets the string index type.
|
9703 | */
|
9704 | getStringIndexType(): Type | undefined;
|
9705 | /**
|
9706 | * Gets the target type of a type reference if it exists.
|
9707 | */
|
9708 | getTargetType(): Type<ts.GenericType> | undefined;
|
9709 | /**
|
9710 | * Gets the target type of a type reference or throws if it doesn't exist.
|
9711 | */
|
9712 | getTargetTypeOrThrow(): Type<ts.GenericType>;
|
9713 | /**
|
9714 | * Gets type arguments.
|
9715 | */
|
9716 | getTypeArguments(): Type[];
|
9717 | /**
|
9718 | * Gets the individual element types of the tuple.
|
9719 | */
|
9720 | getTupleElements(): Type[];
|
9721 | /**
|
9722 | * Gets the union types.
|
9723 | */
|
9724 | getUnionTypes(): Type[];
|
9725 | /**
|
9726 | * Gets the intersection types.
|
9727 | */
|
9728 | getIntersectionTypes(): Type[];
|
9729 | /**
|
9730 | * Gets the symbol of the type.
|
9731 | */
|
9732 | getSymbol(): Symbol | undefined;
|
9733 | /**
|
9734 | * Gets the symbol of the type or throws.
|
9735 | */
|
9736 | getSymbolOrThrow(): Symbol;
|
9737 | /**
|
9738 | * Gets if this is an anonymous type.
|
9739 | */
|
9740 | isAnonymous(): boolean;
|
9741 | /**
|
9742 | * Gets if this is an array type.
|
9743 | */
|
9744 | isArray(): boolean;
|
9745 | /**
|
9746 | * Gets if this is a boolean type.
|
9747 | */
|
9748 | isBoolean(): boolean;
|
9749 | /**
|
9750 | * Gets if this is a string type.
|
9751 | */
|
9752 | isString(): boolean;
|
9753 | /**
|
9754 | * Gets if this is a number type.
|
9755 | */
|
9756 | isNumber(): boolean;
|
9757 | /**
|
9758 | * Gets if this is a literal type.
|
9759 | */
|
9760 | isLiteral(): boolean;
|
9761 | /**
|
9762 | * Gets if this is a boolean literal type.
|
9763 | */
|
9764 | isBooleanLiteral(): boolean;
|
9765 | /**
|
9766 | * Gets if this is an enum literal type.
|
9767 | */
|
9768 | isEnumLiteral(): boolean;
|
9769 | /**
|
9770 | * Gets if this is a number literal type.
|
9771 | */
|
9772 | isNumberLiteral(): boolean;
|
9773 | /**
|
9774 | * Gets if this is a string literal type.
|
9775 | */
|
9776 | isStringLiteral(): boolean;
|
9777 | /**
|
9778 | * Gets if this is a class type.
|
9779 | */
|
9780 | isClass(): boolean;
|
9781 | /**
|
9782 | * Gets if this is a class or interface type.
|
9783 | */
|
9784 | isClassOrInterface(): boolean;
|
9785 | /**
|
9786 | * Gets if this is an enum type.
|
9787 | */
|
9788 | isEnum(): boolean;
|
9789 | /**
|
9790 | * Gets if this is an interface type.
|
9791 | */
|
9792 | isInterface(): boolean;
|
9793 | /**
|
9794 | * Gets if this is an object type.
|
9795 | */
|
9796 | isObject(): boolean;
|
9797 | /**
|
9798 | * Gets if this is a type parameter.
|
9799 | */
|
9800 | isTypeParameter(): this is TypeParameter;
|
9801 | /**
|
9802 | * Gets if this is a tuple type.
|
9803 | */
|
9804 | isTuple(): boolean;
|
9805 | /**
|
9806 | * Gets if this is a union type.
|
9807 | */
|
9808 | isUnion(): boolean;
|
9809 | /**
|
9810 | * Gets if this is an intersection type.
|
9811 | */
|
9812 | isIntersection(): boolean;
|
9813 | /**
|
9814 | * Gets if this is a union or intersection type.
|
9815 | */
|
9816 | isUnionOrIntersection(): boolean;
|
9817 | /**
|
9818 | * Gets if this is the null type.
|
9819 | */
|
9820 | isNull(): boolean;
|
9821 | /**
|
9822 | * Gets if this is the undefined type.
|
9823 | */
|
9824 | isUndefined(): boolean;
|
9825 | /**
|
9826 | * Gets the type flags.
|
9827 | */
|
9828 | getFlags(): TypeFlags;
|
9829 | /**
|
9830 | * Gets the object flags.
|
9831 | * @remarks Returns 0 for a non-object type.
|
9832 | */
|
9833 | getObjectFlags(): ObjectFlags | 0;
|
9834 | private _hasTypeFlag;
|
9835 | private _hasAnyTypeFlag;
|
9836 | private _hasObjectFlag;
|
9837 | }
|
9838 |
|
9839 | export declare class TypeParameter extends Type<ts.TypeParameter> {
|
9840 | |
9841 |
|
9842 |
|
9843 | getConstraintOrThrow(): Type;
|
9844 | |
9845 |
|
9846 |
|
9847 | getConstraint(): Type | undefined;
|
9848 | |
9849 |
|
9850 |
|
9851 | getDefaultOrThrow(): Type;
|
9852 | |
9853 |
|
9854 |
|
9855 | getDefault(): Type | undefined;
|
9856 | }
|
9857 |
|
9858 | export declare class ArgumentError extends BaseError {
|
9859 | protected constructor();
|
9860 | }
|
9861 |
|
9862 | export declare class ArgumentNullOrWhitespaceError extends ArgumentError {
|
9863 | private constructor();
|
9864 | }
|
9865 |
|
9866 | export declare class ArgumentOutOfRangeError extends ArgumentError {
|
9867 | private constructor();
|
9868 | }
|
9869 |
|
9870 | export declare class ArgumentTypeError extends ArgumentError {
|
9871 | private constructor();
|
9872 | }
|
9873 | export declare abstract class BaseError extends Error {
|
9874 | readonly message: string;
|
9875 | protected constructor();
|
9876 | }
|
9877 |
|
9878 | export declare class DirectoryNotFoundError extends PathNotFoundError {
|
9879 | private constructor();
|
9880 | }
|
9881 |
|
9882 | export declare class FileNotFoundError extends PathNotFoundError {
|
9883 | private constructor();
|
9884 | }
|
9885 |
|
9886 | export declare class InvalidOperationError extends BaseError {
|
9887 | private constructor();
|
9888 | }
|
9889 |
|
9890 | export declare class NotImplementedError extends BaseError {
|
9891 | private constructor();
|
9892 | }
|
9893 |
|
9894 | export declare class NotSupportedError extends BaseError {
|
9895 | private constructor();
|
9896 | }
|
9897 |
|
9898 | export declare class PathNotFoundError extends BaseError {
|
9899 | readonly path: string;
|
9900 | protected constructor();
|
9901 | readonly code: "ENOENT";
|
9902 | }
|
9903 |
|
9904 | /**
|
9905 | * Holds the compiler options.
|
9906 | */
|
9907 | export declare class CompilerOptionsContainer extends SettingsContainer<CompilerOptions> {
|
9908 | constructor();
|
9909 | /**
|
9910 | * Sets one or all of the compiler options.
|
9911 | *
|
9912 | * WARNING: Setting the compiler options will cause a complete reparse of all the source files.
|
9913 | * @param settings - Compiler options to set.
|
9914 | */
|
9915 | set(settings: Partial<CompilerOptions>): void;
|
9916 | }
|
9917 |
|
9918 | /** Kinds of indentation */
|
9919 | export declare enum IndentationText {
|
9920 |
|
9921 | TwoSpaces = " ",
|
9922 |
|
9923 | FourSpaces = " ",
|
9924 |
|
9925 | EightSpaces = " ",
|
9926 |
|
9927 | Tab = "\t"
|
9928 | }
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 | export interface ManipulationSettings extends SupportedFormatCodeSettingsOnly {
|
9934 |
|
9935 | indentationText: IndentationText;
|
9936 |
|
9937 | newLineKind: NewLineKind;
|
9938 |
|
9939 | quoteKind: QuoteKind;
|
9940 | }
|
9941 |
|
9942 |
|
9943 |
|
9944 |
|
9945 | export interface SupportedFormatCodeSettings extends SupportedFormatCodeSettingsOnly, EditorSettings {
|
9946 | }
|
9947 |
|
9948 |
|
9949 |
|
9950 |
|
9951 | export interface SupportedFormatCodeSettingsOnly {
|
9952 | |
9953 |
|
9954 |
|
9955 |
|
9956 |
|
9957 | insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: boolean;
|
9958 | }
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 | export declare class ManipulationSettingsContainer extends SettingsContainer<ManipulationSettings> {
|
9964 | private _editorSettings;
|
9965 | private _formatCodeSettings;
|
9966 | private _userPreferences;
|
9967 | constructor();
|
9968 | /**
|
9969 | * Gets the editor settings based on the current manipulation settings.
|
9970 | */
|
9971 | getEditorSettings(): Readonly<EditorSettings>;
|
9972 | /**
|
9973 | * Gets the format code settings.
|
9974 | */
|
9975 | getFormatCodeSettings(): Readonly<SupportedFormatCodeSettings>;
|
9976 | /**
|
9977 | * Gets the user preferences.
|
9978 | */
|
9979 | getUserPreferences(): Readonly<UserPreferences>;
|
9980 | /**
|
9981 | * Gets the quote kind used for string literals.
|
9982 | */
|
9983 | getQuoteKind(): QuoteKind;
|
9984 | /**
|
9985 | * Gets the new line kind.
|
9986 | */
|
9987 | getNewLineKind(): NewLineKind;
|
9988 | /**
|
9989 | * Gets the new line kind as a string.
|
9990 | */
|
9991 | getNewLineKindAsString(): "\n" | "\r\n";
|
9992 | /**
|
9993 | * Gets the indentation text;
|
9994 | */
|
9995 | getIndentationText(): IndentationText;
|
9996 | /**
|
9997 | * Sets one or all of the settings.
|
9998 | * @param settings - Settings to set.
|
9999 | */
|
10000 | set(settings: Partial<ManipulationSettings>): void;
|
10001 | }
|
10002 | export declare abstract class SettingsContainer<T extends object> {
|
10003 | protected constructor();
|
10004 | /**
|
10005 | * Resets the settings to the default.
|
10006 | */
|
10007 | reset(): void;
|
10008 | /**
|
10009 | * Gets a copy of the settings as an object.
|
10010 | */
|
10011 | get(): T;
|
10012 | /**
|
10013 | * Sets one or all of the settings.
|
10014 | * @param settings - Settings to set.
|
10015 | */
|
10016 | set(settings: Partial<T>): void;
|
10017 | }
|
10018 | export interface AbstractableNodeStructure {
|
10019 | isAbstract?: boolean;
|
10020 | }
|
10021 | export interface AmbientableNodeStructure {
|
10022 | hasDeclareKeyword?: boolean;
|
10023 | }
|
10024 | export interface AsyncableNodeStructure {
|
10025 | isAsync?: boolean;
|
10026 | }
|
10027 | export interface AwaitableNodeStructure {
|
10028 | isAwaited?: boolean;
|
10029 | }
|
10030 |
|
10031 | export interface BodiedNodeStructure {
|
10032 | bodyText?: string | WriterFunction;
|
10033 | }
|
10034 |
|
10035 | export interface BodyableNodeStructure {
|
10036 | bodyText?: string | WriterFunction;
|
10037 | }
|
10038 |
|
10039 | export interface DecoratableNodeStructure {
|
10040 | decorators?: DecoratorStructure[];
|
10041 | }
|
10042 | export interface ExclamationTokenableNodeStructure {
|
10043 | hasExclamationToken?: boolean;
|
10044 | }
|
10045 | export interface ExportableNodeStructure {
|
10046 | isExported?: boolean;
|
10047 | isDefaultExport?: boolean;
|
10048 | }
|
10049 |
|
10050 | export interface ExtendsClauseableNodeStructure {
|
10051 | extends?: (string | WriterFunction)[] | WriterFunction;
|
10052 | }
|
10053 | export interface GeneratorableNodeStructure {
|
10054 | isGenerator?: boolean;
|
10055 | }
|
10056 |
|
10057 | export interface ImplementsClauseableNodeStructure {
|
10058 | implements?: (string | WriterFunction)[] | WriterFunction;
|
10059 | }
|
10060 |
|
10061 | export interface InitializerExpressionableNodeStructure extends InitializerSetExpressionableNodeStructure {
|
10062 | }
|
10063 |
|
10064 | export interface InitializerSetExpressionableNodeStructure {
|
10065 | initializer?: string | WriterFunction;
|
10066 | }
|
10067 |
|
10068 | export interface JSDocableNodeStructure {
|
10069 | docs?: (JSDocStructure | string)[];
|
10070 | }
|
10071 |
|
10072 | export interface ModuledNodeStructure {
|
10073 | imports?: ImportDeclarationStructure[];
|
10074 | exports?: ExportDeclarationStructure[];
|
10075 | }
|
10076 | export interface BindingNamedNodeStructure {
|
10077 | name: string;
|
10078 | }
|
10079 | export interface DeclarationNamedNodeStructure {
|
10080 | name?: string;
|
10081 | }
|
10082 | export interface NameableNodeStructure {
|
10083 | name?: string;
|
10084 | }
|
10085 | export interface NamedNodeStructure {
|
10086 | name: string;
|
10087 | }
|
10088 | export interface PropertyNameableNodeStructure {
|
10089 | name?: string;
|
10090 | }
|
10091 | export interface PropertyNamedNodeStructure {
|
10092 | name: string;
|
10093 | }
|
10094 |
|
10095 | export interface ParameteredNodeStructure {
|
10096 | parameters?: ParameterDeclarationStructure[];
|
10097 | }
|
10098 | export interface QuestionTokenableNodeStructure {
|
10099 | hasQuestionToken?: boolean;
|
10100 | }
|
10101 | export interface ReadonlyableNodeStructure {
|
10102 | isReadonly?: boolean;
|
10103 | }
|
10104 |
|
10105 | export interface ReturnTypedNodeStructure {
|
10106 | returnType?: string | WriterFunction;
|
10107 | }
|
10108 |
|
10109 | export interface ScopeableNodeStructure {
|
10110 | scope?: Scope;
|
10111 | }
|
10112 |
|
10113 | export interface ScopedNodeStructure {
|
10114 | scope?: Scope;
|
10115 | }
|
10116 |
|
10117 | export interface SignaturedDeclarationStructure extends ParameteredNodeStructure, ReturnTypedNodeStructure {
|
10118 | }
|
10119 | export interface StaticableNodeStructure {
|
10120 | isStatic?: boolean;
|
10121 | }
|
10122 |
|
10123 | export interface TypedNodeStructure {
|
10124 | type?: string | WriterFunction;
|
10125 | }
|
10126 |
|
10127 | export interface TypeElementMemberedNodeStructure {
|
10128 | callSignatures?: CallSignatureDeclarationStructure[];
|
10129 | constructSignatures?: ConstructSignatureDeclarationStructure[];
|
10130 | indexSignatures?: IndexSignatureDeclarationStructure[];
|
10131 | methods?: MethodSignatureStructure[];
|
10132 | properties?: PropertySignatureStructure[];
|
10133 | }
|
10134 |
|
10135 | export interface TypeParameteredNodeStructure {
|
10136 | typeParameters?: (TypeParameterDeclarationStructure | string)[];
|
10137 | }
|
10138 |
|
10139 | export interface ClassLikeDeclarationBaseStructure extends NameableNodeStructure, ClassLikeDeclarationBaseSpecificStructure, ImplementsClauseableNodeStructure, DecoratableNodeStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, AbstractableNodeStructure {
|
10140 | }
|
10141 |
|
10142 | interface ClassLikeDeclarationBaseSpecificStructure {
|
10143 | extends?: string | WriterFunction;
|
10144 | ctors?: ConstructorDeclarationStructure[];
|
10145 | properties?: PropertyDeclarationStructure[];
|
10146 | getAccessors?: GetAccessorDeclarationStructure[];
|
10147 | setAccessors?: SetAccessorDeclarationStructure[];
|
10148 | methods?: MethodDeclarationStructure[];
|
10149 | }
|
10150 |
|
10151 | export interface ClassDeclarationStructure extends ClassLikeDeclarationBaseStructure, ClassDeclarationSpecificStructure, AmbientableNodeStructure, ExportableNodeStructure {
|
10152 | |
10153 |
|
10154 |
|
10155 |
|
10156 | name?: string;
|
10157 | }
|
10158 |
|
10159 | interface ClassDeclarationSpecificStructure {
|
10160 | }
|
10161 |
|
10162 | export interface ConstructorDeclarationStructure extends ConstructorDeclarationSpecificStructure, ScopedNodeStructure, FunctionLikeDeclarationStructure, BodyableNodeStructure {
|
10163 | }
|
10164 |
|
10165 | interface ConstructorDeclarationSpecificStructure {
|
10166 | overloads?: ConstructorDeclarationOverloadStructure[];
|
10167 | }
|
10168 |
|
10169 | export interface ConstructorDeclarationOverloadStructure extends ScopedNodeStructure, SignaturedDeclarationStructure, TypeParameteredNodeStructure, JSDocableNodeStructure {
|
10170 | }
|
10171 |
|
10172 | export interface GetAccessorDeclarationStructure extends GetAccessorDeclarationSpecificStructure, PropertyNamedNodeStructure, StaticableNodeStructure, DecoratableNodeStructure, AbstractableNodeStructure, ScopedNodeStructure, FunctionLikeDeclarationStructure, BodyableNodeStructure {
|
10173 | }
|
10174 |
|
10175 | interface GetAccessorDeclarationSpecificStructure {
|
10176 | }
|
10177 |
|
10178 | export interface MethodDeclarationStructure extends MethodDeclarationSpecificStructure, PropertyNamedNodeStructure, StaticableNodeStructure, DecoratableNodeStructure, AbstractableNodeStructure, ScopedNodeStructure, AsyncableNodeStructure, GeneratorableNodeStructure, FunctionLikeDeclarationStructure, BodyableNodeStructure, QuestionTokenableNodeStructure {
|
10179 | }
|
10180 |
|
10181 | interface MethodDeclarationSpecificStructure {
|
10182 | overloads?: MethodDeclarationOverloadStructure[];
|
10183 | }
|
10184 |
|
10185 | export interface MethodDeclarationOverloadStructure extends StaticableNodeStructure, AbstractableNodeStructure, ScopedNodeStructure, AsyncableNodeStructure, GeneratorableNodeStructure, SignaturedDeclarationStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, QuestionTokenableNodeStructure {
|
10186 | }
|
10187 |
|
10188 | export interface PropertyDeclarationStructure extends PropertyDeclarationSpecificStructure, PropertyNamedNodeStructure, TypedNodeStructure, QuestionTokenableNodeStructure, ExclamationTokenableNodeStructure, StaticableNodeStructure, ScopedNodeStructure, JSDocableNodeStructure, ReadonlyableNodeStructure, InitializerExpressionableNodeStructure, DecoratableNodeStructure, AbstractableNodeStructure {
|
10189 | }
|
10190 |
|
10191 | interface PropertyDeclarationSpecificStructure {
|
10192 | }
|
10193 |
|
10194 | export interface SetAccessorDeclarationStructure extends SetAccessorDeclarationSpecificStructure, PropertyNamedNodeStructure, StaticableNodeStructure, DecoratableNodeStructure, AbstractableNodeStructure, ScopedNodeStructure, FunctionLikeDeclarationStructure, BodyableNodeStructure {
|
10195 | }
|
10196 |
|
10197 | interface SetAccessorDeclarationSpecificStructure {
|
10198 | }
|
10199 |
|
10200 | export interface DecoratorStructure {
|
10201 | name: string;
|
10202 | |
10203 |
|
10204 |
|
10205 |
|
10206 | arguments?: (string | WriterFunction)[] | WriterFunction;
|
10207 | typeArguments?: string[];
|
10208 | }
|
10209 |
|
10210 | export interface JSDocStructure {
|
10211 | description: string | WriterFunction;
|
10212 | }
|
10213 |
|
10214 | export interface ExpressionedNodeStructure {
|
10215 | expression: string | WriterFunction;
|
10216 | }
|
10217 |
|
10218 | export interface PropertyAssignmentStructure extends PropertyAssignmentSpecificStructure, PropertyNamedNodeStructure {
|
10219 | }
|
10220 |
|
10221 | interface PropertyAssignmentSpecificStructure {
|
10222 | initializer: string | WriterFunction;
|
10223 | }
|
10224 |
|
10225 | export interface ShorthandPropertyAssignmentStructure extends ShorthandPropertyAssignmentSpecificStructure, NamedNodeStructure {
|
10226 | }
|
10227 |
|
10228 | interface ShorthandPropertyAssignmentSpecificStructure {
|
10229 | }
|
10230 |
|
10231 | export interface SpreadAssignmentStructure extends ExpressionedNodeStructure {
|
10232 | }
|
10233 |
|
10234 | export interface EnumDeclarationStructure extends NamedNodeStructure, EnumDeclarationSpecificStructure, JSDocableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure {
|
10235 | }
|
10236 |
|
10237 | interface EnumDeclarationSpecificStructure {
|
10238 | isConst?: boolean;
|
10239 | members?: EnumMemberStructure[];
|
10240 | }
|
10241 |
|
10242 | export interface EnumMemberStructure extends EnumMemberSpecificStructure, PropertyNamedNodeStructure, JSDocableNodeStructure, InitializerExpressionableNodeStructure {
|
10243 | }
|
10244 |
|
10245 | interface EnumMemberSpecificStructure {
|
10246 | value?: number | string;
|
10247 | }
|
10248 |
|
10249 | export interface FunctionDeclarationStructure extends FunctionDeclarationSpecificStructure, NameableNodeStructure, FunctionLikeDeclarationStructure, StatementedNodeStructure, AsyncableNodeStructure, GeneratorableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure, BodyableNodeStructure {
|
10250 | }
|
10251 |
|
10252 | interface FunctionDeclarationSpecificStructure {
|
10253 | overloads?: FunctionDeclarationOverloadStructure[];
|
10254 | }
|
10255 |
|
10256 | export interface FunctionDeclarationOverloadStructure extends SignaturedDeclarationStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, AsyncableNodeStructure, GeneratorableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure {
|
10257 | }
|
10258 |
|
10259 | export interface FunctionLikeDeclarationStructure extends SignaturedDeclarationStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, StatementedNodeStructure {
|
10260 | }
|
10261 |
|
10262 | export interface ParameterDeclarationStructure extends DeclarationNamedNodeStructure, TypedNodeStructure, ReadonlyableNodeStructure, DecoratableNodeStructure, QuestionTokenableNodeStructure, ScopeableNodeStructure, InitializerExpressionableNodeStructure, ParameterDeclarationSpecificStructure {
|
10263 | }
|
10264 |
|
10265 | interface ParameterDeclarationSpecificStructure {
|
10266 | isRestParameter?: boolean;
|
10267 | }
|
10268 |
|
10269 | export interface CallSignatureDeclarationStructure extends CallSignatureDeclarationSpecificStructure, JSDocableNodeStructure, SignaturedDeclarationStructure, TypeParameteredNodeStructure {
|
10270 | }
|
10271 |
|
10272 | interface CallSignatureDeclarationSpecificStructure {
|
10273 | }
|
10274 |
|
10275 | export interface ConstructSignatureDeclarationStructure extends ConstructSignatureDeclarationSpecificStructure, JSDocableNodeStructure, SignaturedDeclarationStructure, TypeParameteredNodeStructure {
|
10276 | }
|
10277 |
|
10278 | interface ConstructSignatureDeclarationSpecificStructure {
|
10279 | }
|
10280 |
|
10281 | export interface IndexSignatureDeclarationStructure extends IndexSignatureDeclarationSpecificStructure, JSDocableNodeStructure, ReadonlyableNodeStructure, ReturnTypedNodeStructure {
|
10282 | }
|
10283 |
|
10284 | interface IndexSignatureDeclarationSpecificStructure {
|
10285 | keyName?: string;
|
10286 | keyType?: string;
|
10287 | }
|
10288 |
|
10289 | export interface InterfaceDeclarationStructure extends NamedNodeStructure, InterfaceDeclarationSpecificStructure, ExtendsClauseableNodeStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure, TypeElementMemberedNodeStructure {
|
10290 | }
|
10291 |
|
10292 | interface InterfaceDeclarationSpecificStructure {
|
10293 | }
|
10294 |
|
10295 | export interface MethodSignatureStructure extends PropertyNamedNodeStructure, MethodSignatureSpecificStructure, QuestionTokenableNodeStructure, JSDocableNodeStructure, SignaturedDeclarationStructure, TypeParameteredNodeStructure {
|
10296 | }
|
10297 |
|
10298 | interface MethodSignatureSpecificStructure {
|
10299 | }
|
10300 |
|
10301 | export interface PropertySignatureStructure extends PropertySignatureSpecificStructure, PropertyNamedNodeStructure, TypedNodeStructure, QuestionTokenableNodeStructure, JSDocableNodeStructure, ReadonlyableNodeStructure, InitializerExpressionableNodeStructure {
|
10302 | }
|
10303 |
|
10304 | interface PropertySignatureSpecificStructure {
|
10305 | }
|
10306 |
|
10307 | export interface JsxAttributeStructure extends JsxAttributeSpecificStructure, NamedNodeStructure {
|
10308 | }
|
10309 |
|
10310 | interface JsxAttributeSpecificStructure {
|
10311 | isSpreadAttribute?: false;
|
10312 | initializer?: string;
|
10313 | }
|
10314 |
|
10315 | export interface JsxElementStructure {
|
10316 | name: string;
|
10317 | attributes?: (JsxAttributeStructure | JsxSpreadAttributeStructure)[];
|
10318 | isSelfClosing?: boolean;
|
10319 | children?: JsxElementStructure[];
|
10320 | bodyText?: string;
|
10321 | }
|
10322 | export interface JsxSpreadAttributeStructure {
|
10323 | isSpreadAttribute: true;
|
10324 | expression: string;
|
10325 | }
|
10326 |
|
10327 | export interface ExportAssignmentStructure {
|
10328 | isExportEquals?: boolean;
|
10329 | expression: string | WriterFunction;
|
10330 | }
|
10331 |
|
10332 | export interface ExportDeclarationStructure {
|
10333 | namedExports?: (string | ExportSpecifierStructure | WriterFunction)[] | WriterFunction;
|
10334 | moduleSpecifier?: string;
|
10335 | }
|
10336 | export interface ExportSpecifierStructure {
|
10337 | name: string;
|
10338 | alias?: string;
|
10339 | }
|
10340 |
|
10341 | export interface ImportDeclarationStructure {
|
10342 | defaultImport?: string;
|
10343 | namespaceImport?: string;
|
10344 | namedImports?: (ImportSpecifierStructure | string | WriterFunction)[] | WriterFunction;
|
10345 | moduleSpecifier: string;
|
10346 | }
|
10347 | export interface ImportSpecifierStructure {
|
10348 | name: string;
|
10349 | alias?: string;
|
10350 | }
|
10351 |
|
10352 | export interface NamespaceDeclarationStructure extends NamedNodeStructure, NamespaceDeclarationSpecificStructure, JSDocableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure, StatementedNodeStructure, BodiedNodeStructure, ModuledNodeStructure {
|
10353 | }
|
10354 |
|
10355 | interface NamespaceDeclarationSpecificStructure {
|
10356 | |
10357 |
|
10358 |
|
10359 |
|
10360 |
|
10361 | declarationKind?: NamespaceDeclarationKind;
|
10362 | }
|
10363 |
|
10364 | export interface SourceFileStructure extends SourceFileSpecificStructure, StatementedNodeStructure, ModuledNodeStructure {
|
10365 | bodyText?: string | WriterFunction;
|
10366 | }
|
10367 |
|
10368 | interface SourceFileSpecificStructure {
|
10369 | }
|
10370 |
|
10371 | export interface StatementedNodeStructure {
|
10372 | classes?: ClassDeclarationStructure[];
|
10373 | enums?: EnumDeclarationStructure[];
|
10374 | functions?: FunctionDeclarationStructure[];
|
10375 | interfaces?: InterfaceDeclarationStructure[];
|
10376 | namespaces?: NamespaceDeclarationStructure[];
|
10377 | typeAliases?: TypeAliasDeclarationStructure[];
|
10378 | }
|
10379 |
|
10380 | export interface VariableDeclarationListStructure extends VariableDeclarationListSpecificStructure {
|
10381 | }
|
10382 |
|
10383 | interface VariableDeclarationListSpecificStructure {
|
10384 | declarationKind?: VariableDeclarationKind;
|
10385 | declarations: VariableDeclarationStructure[];
|
10386 | }
|
10387 |
|
10388 | export interface VariableDeclarationStructure extends VariableDeclarationSpecificStructure, BindingNamedNodeStructure, InitializerExpressionableNodeStructure, TypedNodeStructure, ExclamationTokenableNodeStructure {
|
10389 | }
|
10390 |
|
10391 | interface VariableDeclarationSpecificStructure {
|
10392 | }
|
10393 |
|
10394 | export interface VariableStatementStructure extends VariableStatementSpecificStructure, JSDocableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure {
|
10395 | }
|
10396 |
|
10397 | interface VariableStatementSpecificStructure {
|
10398 | declarationKind?: VariableDeclarationKind;
|
10399 | declarations: VariableDeclarationStructure[];
|
10400 | }
|
10401 |
|
10402 | export interface TypeAliasDeclarationStructure extends TypeAliasDeclarationSpecificStructure, NamedNodeStructure, TypedNodeStructure, TypeParameteredNodeStructure, JSDocableNodeStructure, AmbientableNodeStructure, ExportableNodeStructure {
|
10403 | type: string | WriterFunction;
|
10404 | }
|
10405 |
|
10406 | interface TypeAliasDeclarationSpecificStructure {
|
10407 | type: string | WriterFunction;
|
10408 | }
|
10409 |
|
10410 | export interface TypeParameterDeclarationStructure extends TypeParameterDeclarationSpecificStructure, NamedNodeStructure {
|
10411 | }
|
10412 |
|
10413 | interface TypeParameterDeclarationSpecificStructure {
|
10414 | constraint?: string | WriterFunction;
|
10415 | default?: string | WriterFunction;
|
10416 | }
|
10417 |
|
10418 | export { ts, SyntaxKind, CompilerOptions, EmitHint, ScriptKind, NewLineKind, LanguageVariant, ScriptTarget, TypeFlags, ObjectFlags, SymbolFlags, TypeFormatFlags, DiagnosticCategory, EditorSettings, ModuleResolutionKind };
|
10419 | export * from "./code-block-writer";
|
10420 |
|
10421 |
|
10422 | export default Project;
|