update
This commit is contained in:
+2
-2
@@ -1,2 +1,2 @@
|
||||
import { TransformOptions } from './types';
|
||||
export default function transform(opts: TransformOptions): string;
|
||||
import { TransformOptions, TRANSFORM_RESULT } from './types';
|
||||
export default function transform(opts: TransformOptions): TRANSFORM_RESULT;
|
||||
|
||||
+344
-453
File diff suppressed because one or more lines are too long
+8
-9
@@ -1,10 +1,9 @@
|
||||
/// <reference types="node" />
|
||||
import 'v8-compile-cache';
|
||||
import { TransformOptions } from './types';
|
||||
export declare type JITIOptions = {
|
||||
transform?: (opts: TransformOptions) => string;
|
||||
debug?: boolean;
|
||||
cache?: boolean;
|
||||
cacheDir?: string;
|
||||
};
|
||||
export default function createJITI(_filename?: string, opts?: JITIOptions): NodeRequire;
|
||||
import { TransformOptions, JITIOptions } from './types';
|
||||
declare type Require = typeof require;
|
||||
export interface JITI extends Require {
|
||||
transform: (opts: TransformOptions) => string;
|
||||
register: () => (() => void);
|
||||
}
|
||||
export default function createJITI(_filename: string, opts?: JITIOptions, parentModule?: typeof module): JITI;
|
||||
export {};
|
||||
|
||||
+1
-2
File diff suppressed because one or more lines are too long
+4
@@ -0,0 +1,4 @@
|
||||
import type { PluginObj } from '@babel/core';
|
||||
export declare function TransformImportMetaPlugin(_ctx: any, opts: {
|
||||
filename?: string;
|
||||
}): PluginObj<import("@babel/core").PluginPass>;
|
||||
+23
-1
@@ -1,5 +1,27 @@
|
||||
export declare type TransformOptions = {
|
||||
source: string;
|
||||
filename?: string;
|
||||
ts?: Boolean;
|
||||
ts?: boolean;
|
||||
retainLines?: boolean;
|
||||
legacy?: boolean;
|
||||
[key: string]: any;
|
||||
};
|
||||
export declare type TRANSFORM_RESULT = {
|
||||
code: string;
|
||||
error?: any;
|
||||
};
|
||||
export declare type JITIOptions = {
|
||||
transform?: (opts: TransformOptions) => TRANSFORM_RESULT;
|
||||
debug?: boolean;
|
||||
cache?: boolean | string;
|
||||
sourceMaps?: boolean;
|
||||
requireCache?: boolean;
|
||||
v8cache?: boolean;
|
||||
interopDefault?: boolean;
|
||||
esmResolve?: boolean;
|
||||
cacheVersion?: string;
|
||||
onError?: (error: Error) => void;
|
||||
legacy?: boolean;
|
||||
extensions?: string[];
|
||||
transformOptions?: Omit<TransformOptions, 'source'>;
|
||||
};
|
||||
|
||||
+6
-1
@@ -1,2 +1,7 @@
|
||||
import type { PackageJson } from 'pkg-types';
|
||||
export declare function isDir(filename: string): boolean;
|
||||
export declare function interopDefault(ex: any): any;
|
||||
export declare function isWritable(filename: string): boolean;
|
||||
export declare function md5(content: string, len?: number): string;
|
||||
export declare function detectLegacySyntax(code: string): RegExpMatchArray | null;
|
||||
export declare function isObject(val: any): boolean;
|
||||
export declare function readNearestPackageJSON(path: string): PackageJson | undefined;
|
||||
|
||||
Reference in New Issue
Block a user