Skip to main content
Module

x/ts_morph/common/mod.ts>DocumentRegistry#createOrUpdateSourceFile

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method DocumentRegistry.prototype.createOrUpdateSourceFile
import { DocumentRegistry } from "https://deno.land/x/ts_morph@15.1.0/common/mod.ts";

Creates or updates a source file in the document registry.

Parameters

  • File name to create or update.
compilationSettings: CompilerOptions
  • Compiler options to use.
scriptSnapshot: ts.IScriptSnapshot
  • Script snapshot (text) of the file.
scriptKind: ScriptKind | undefined
  • Script kind of the file.

Returns

ts.SourceFile