UNPKG

613 BTypeScriptView Raw
1/// <reference types="node" />
2import { TransformOptions } from './types';
3export declare type JITIOptions = {
4 transform?: (opts: TransformOptions) => string;
5 debug?: boolean;
6 cache?: boolean | string;
7 dynamicImport?: (id: string) => Promise<any>;
8 onError?: (error: Error) => void;
9 legacy?: boolean;
10 extensions?: string[];
11};
12declare type Require = typeof require;
13export interface JITI extends Require {
14 transform: (opts: TransformOptions) => string;
15 register: () => (() => void);
16}
17export default function createJITI(_filename?: string, opts?: JITIOptions): JITI;
18export {};