Gets the compiler options for modification.
Gets the manipulation settings.
Adds an existing directory from the path or throws if it doesn't exist.
Will return the directory if it was already added.
Path to add the directory at.
Optionaloptions: DirectoryAddOptionsOptions.
Adds an existing directory from the path or returns undefined if it doesn't exist.
Will return the directory if it was already added.
Path to add the directory at.
Optionaloptions: DirectoryAddOptionsOptions.
Recursively adds any .now.ts files in the specified directory, and returns the added files. Glob patterns can be supplied to control which files are added. This will also resolve the dependencies of the added files. If the directory does not exist, an empty array will be returned.
Adds an existing source file from a file path or throws if it doesn't exist.
Will return the source file if it was already added.
File path to get the file from.
Adds a source file from a file path if it exists or returns undefined.
Will return the source file if it was already added.
File path to get the file from.
Adds source files based on file globs.
File glob or globs to add files based on.
The matched source files.
Recursively adds any source files in the specified directory, and returns the added files. Glob patterns can be supplied to control which files are added. This will also resolve the dependencies of the added files. If the directory does not exist, an empty array will be returned.
OptionalexcludePatterns: string[]Adds all the source files from the specified tsconfig.json.
Note that this is done by default when specifying a tsconfig file in the constructor and not explicitly setting the
skipAddingFilesFromTsConfig option to true.
File path to the tsconfig.json file.
OptionaltsConfigPath: stringCreates a directory at the specified path.
Path to create the directory at.
Creates a source file at the specified file path with the specified text.
Note: The file will not be created and saved to the file system until .save() is called on the source file.
File path of the source file.
OptionalsourceFileText: string | WriterFunction | OptionalKind<SourceFileStructure>Text, structure, or writer function for the source file text.
Optionaloptions: SourceFileCreateOptionsOptions.
Creates a writer with the current manipulation settings.
Asynchronously emits all the source files to the file system as JavaScript files.
OptionalemitOptions: EmitOptionsOptional emit options.
Synchronously emits all the source files to the file system as JavaScript files.
OptionalemitOptions: EmitOptionsOptional emit options.
Emits all the source files to memory.
OptionalemitOptions: EmitOptionsOptional emit options.
Enables logging to the console.
Optionalenabled: booleanEnabled.
Forgets the nodes created in the scope of the passed in block.
This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
Forgets the nodes created in the scope of the passed in block asynchronously.
This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
Formats an array of diagnostics with their color and context into a string.
Diagnostics to get a string of.
Optionalopts: { newLineChar?: "\n" | "\r\n" }Gets the specified ambient module symbol or returns undefined if not found.
The ambient module name with or without quotes.
Gets the specified ambient module symbol or throws if not found.
The ambient module name with or without quotes.
Optionalmessage: string | (() => string)Gets the compiler options.
Gets the diagnostics found when parsing the tsconfig.json file provided in the project's constructor.
Gets all the directories.
Gets a directory by the specified path or returns undefined if it doesn't exist.
Directory path.
Gets a directory by the specified path or throws if it doesn't exist.
Path to create the directory at.
Optionalmessage: string | (() => string)Gets the file system.
Gets the language service.
Gets a ts.ModuleResolutionHost for the project.
Optionaloptions: SourceFileCreateOptionsGets the pre-emit diagnostics.
Gets the program.
Gets the directories without a parent.
Gets a source file by a file name or file path. Returns undefined if none exists.
File name or path that the path could end with or equal.
Gets a source file by a search function. Returns undefined if none exists.
Search function.
Gets a source file by a file name or file path. Throws an error if it doesn't exist.
File name or path that the path could end with or equal.
Gets a source file by a search function. Throws an error if it doesn't exist.
Search function.
Gets all the source files added to the project.
Gets all the source files added to the project that match a pattern.
Glob pattern for filtering out the source files.
Gets all the source files added to the project that match the passed in patterns.
Glob patterns for filtering out the source files.
Gets the type checker.
Removes a source file from the project.
Source file to remove.
True if removed.
Adds the source files the project's source files depend on to the project.
The added source files.
Saves all the unsaved source files to the file system and deletes all deleted files.
Synchronously saves all the unsaved source files to the file system and deletes all deleted files.
Remarks: This might be very slow compared to the asynchronous version if there are a lot of files.
OptionalunsupportedNodeVisitor: (node: Node) => void | Promise<void>
Project that holds source files.