xnr
Version:
Easily, quickly and reliably run a Node.js script from the CLI.
19 lines (18 loc) • 611 B
TypeScript
import { KnownExtension, SourceFileNode, SucraseOptions } from "./utils";
export declare const createSourceFileTree: ({ entry, getSucraseOptions, }: {
entry: string;
getSucraseOptions?: (absFilePath: string) => SucraseOptions;
}) => SourceFileNode;
/**
* Create a function that can be used to get the resolved path of a file.
*
* Only accepts absolute paths.
*
* Follows symlinks
*/
export declare const createResolve: () => ({ absPath, method, absFromPath, fromExt, }: {
absPath: string;
method: "import" | "require";
absFromPath?: string;
fromExt?: KnownExtension;
}) => string;