Skip to main content
Module

x/ts_morph/common/ts_morph_common.d.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@17.0.1/common/ts_morph_common.d.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