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

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

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

Gets a source file by a file name or file path. Throws an error if it doesn't exist.

Parameters

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

Gets a source file by a search function. Throws an error if it doesn't exist.

Parameters

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