import { type TsSourceFileContainer } from "https://dotland.deno.dev/x/ts_morph@21.0.0/common/ts_morph_common.d.ts";
A container of source files.
Methods
containsSourceFileAtPath(filePath: StandardizedFilePath): boolean
Gets if a source file exists at the specified file path.
getSourceFilePaths(): Iterable<StandardizedFilePath>
Gets the source file paths of all the source files in the container.
getSourceFileFromCacheFromFilePath(filePath: StandardizedFilePath): ts.SourceFile | undefined
Gets a source file from a file path, but only if it exists in the container's cache.
addOrGetSourceFileFromFilePath(filePath: StandardizedFilePath, opts: { markInProject: boolean; scriptKind: ts.ScriptKind | undefined; }): Promise<ts.SourceFile | undefined>
Asynchronously adds or gets a source file from a file path.
addOrGetSourceFileFromFilePathSync(filePath: StandardizedFilePath, opts: { markInProject: boolean; scriptKind: ts.ScriptKind | undefined; }): ts.SourceFile | undefined
Synchronously adds or gets a source file from a file path.
containsDirectoryAtPath(dirPath: StandardizedFilePath): boolean
Gets if the container contains the specified directory.
getChildDirectoriesOfDirectory(dirPath: StandardizedFilePath): StandardizedFilePath[]
Gets the child directories of the specified directory.