Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

Compile your Deno project to run on Node.js.
Go to Latest
method Project.prototype.getSourceFile
import { Project } from "https://deno.land/x/deno2node@v1.12.0/src/deps.deno.ts";

Gets a source file by a file name or file path. Returns undefined if none exists.

Parameters

fileNameOrPath: string
  • File name or path that the path could end with or equal.

Returns

SourceFile | undefined

Gets a source file by a search function. Returns undefined if none exists.

Parameters

searchFunction: (file: SourceFile) => boolean
  • Search function.

Returns

SourceFile | undefined