Skip to main content
Module

x/ts_morph/ts_morph.d.ts>Directory#createSourceFile

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

Creates a source file, relative to this directory.

Note: The file will not be created and saved to the file system until .save() is called on the source file.

Parameters

relativeFilePath: string
  • Relative file path of the source file to create.
optional
sourceFileText: string | OptionalKind<SourceFileStructure> | WriterFunction
  • Text, structure, or writer function to create the source file text with.
optional
options: SourceFileCreateOptions
  • Options.