Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method Project.prototype.addSourceFileAtPathIfExists
import { Project } from "https://deno.land/x/fresh_testing_library@0.13.0/deps/ts_morph.ts";

Adds a source file from a file path if it exists or returns undefined.

Will return the source file if it was already added.

Parameters

filePath: string
  • File path to get the file from.

Returns

SourceFile | undefined