|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
888 bytes
|
| Line | |
|---|
| 1 | import { Module } from "module";
|
|---|
| 2 | import { TransformOptions, JITIOptions, JITIImportOptions } from "./types";
|
|---|
| 3 | export type { JITIOptions, TransformOptions } from "./types";
|
|---|
| 4 | type Require = typeof require;
|
|---|
| 5 | type Module = typeof module;
|
|---|
| 6 | type ModuleCache = Record<string, Module>;
|
|---|
| 7 | export type EvalModuleOptions = Partial<{
|
|---|
| 8 | id: string;
|
|---|
| 9 | filename: string;
|
|---|
| 10 | ext: string;
|
|---|
| 11 | cache: ModuleCache;
|
|---|
| 12 | }>;
|
|---|
| 13 | export interface JITI extends Require {
|
|---|
| 14 | transform: (opts: TransformOptions) => string;
|
|---|
| 15 | register: () => () => void;
|
|---|
| 16 | evalModule: (source: string, options?: EvalModuleOptions) => unknown;
|
|---|
| 17 | /** @experimental Behavior of `jiti.import` might change in the future. */
|
|---|
| 18 | import: (id: string, importOptions: JITIImportOptions) => Promise<unknown>;
|
|---|
| 19 | }
|
|---|
| 20 | export default function createJITI(_filename: string, opts?: JITIOptions, parentModule?: Module, parentCache?: ModuleCache): JITI;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.