Module

x/ts_morph/common/ts_morph_common.d.ts>DocumentRegistry

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Go to Latest
class DocumentRegistry
implements [ts.DocumentRegistry]
import { DocumentRegistry } from "https://dotland.deno.dev/x/ts_morph@21.0.0/common/ts_morph_common.d.ts";

An implementation of a ts.DocumentRegistry that uses a transactional file system.

Constructors

new
DocumentRegistry(transactionalFileSystem: TransactionalFileSystem)

Constructor.

Methods

acquireDocument(
fileName: string,
compilationSettings: ts.CompilerOptions,
scriptSnapshot: ts.IScriptSnapshot,
version: string,
scriptKind: ts.ScriptKind | undefined,
): ts.SourceFile
acquireDocumentWithKey(
fileName: string,
path: ts.Path,
compilationSettings: ts.CompilerOptions,
key: ts.DocumentRegistryBucketKey,
scriptSnapshot: ts.IScriptSnapshot,
version: string,
scriptKind: ts.ScriptKind | undefined,
): ts.SourceFile
createOrUpdateSourceFile(
compilationSettings: ts.CompilerOptions,
scriptSnapshot: ts.IScriptSnapshot,
scriptKind: ts.ScriptKind | undefined,
): ts.SourceFile

Creates or updates a source file in the document registry.

getKeyForCompilationSettings(settings: ts.CompilerOptions): ts.DocumentRegistryBucketKey
getSourceFileVersion(sourceFile: ts.SourceFile): string
releaseDocument(fileName: string, compilationSettings: ts.CompilerOptions): void
releaseDocumentWithKey(path: ts.Path, key: ts.DocumentRegistryBucketKey): void

Removes the source file from the document registry.

reportStats(): string
updateDocument(
fileName: string,
compilationSettings: ts.CompilerOptions,
scriptSnapshot: ts.IScriptSnapshot,
version: string,
scriptKind: ts.ScriptKind | undefined,
): ts.SourceFile
updateDocumentWithKey(
fileName: string,
path: ts.Path,
compilationSettings: ts.CompilerOptions,
key: ts.DocumentRegistryBucketKey,
scriptSnapshot: ts.IScriptSnapshot,
version: string,
scriptKind: ts.ScriptKind | undefined,
): ts.SourceFile