Skip to main content
Module

x/ts_morph/bootstrap/ts_morph_bootstrap.d.ts>Project#createSourceFile

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Project.prototype.createSourceFile
import { Project } from "https://deno.land/x/ts_morph@15.1.0/bootstrap/ts_morph_bootstrap.d.ts";

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.

Parameters

filePath: string
  • File path of the source file.
optional
sourceFileText: string
  • Text to use for the source file.
optional
options: { scriptKind?: ts.ScriptKind; }
  • Options.

Returns

ts.SourceFile