@vercel/node
Version:
35 lines (34 loc) • 850 B
TypeScript
import _ts from 'typescript';
/**
* Registration options.
*/
interface Options {
basePath?: string;
pretty?: boolean | null;
logError?: boolean | null;
files?: boolean | null;
compiler?: string;
ignore?: string[];
project?: string;
compilerOptions?: any;
ignoreDiagnostics?: Array<number | string>;
readFile?: (path: string) => string | undefined;
fileExists?: (path: string) => boolean;
transformers?: _ts.CustomTransformers;
}
/**
* Return type for registering `ts-node`.
*/
export declare type Register = (code: string, fileName: string, skipTypeCheck?: boolean) => SourceOutput;
/**
* Register TypeScript compiler.
*/
export declare function register(opts?: Options): Register;
/**
* Internal source output.
*/
declare type SourceOutput = {
code: string;
map: string;
};
export {};