Skip to main content
Module

x/deno2node/src/deps.deno.ts>Project#addSourceFileAtPathIfExists

Compile your Deno project to run on Node.js.
Go to Latest
method Project.prototype.addSourceFileAtPathIfExists
import { Project } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.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