Skip to main content
Module

x/ts_morph/mod.ts>Directory#getSourceFile

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

Gets a child source file with the specified path or undefined if not found.

Parameters

path: string
  • Relative or absolute path to the file.

Returns

SourceFile | undefined

Gets a child source file by the specified condition or undefined if not found.

Parameters

condition: (sourceFile: SourceFile) => boolean
  • Condition to check the source file with.

Returns

SourceFile | undefined