/* auto-generated by NAPI-RS */ /* eslint-disable */ /** The WASI flavor this loader instantiates. */ export declare const __napiBindingTarget: 'wasm32-wasi' export declare class Output { /** * Returns the generated code * Cache the result of this function if you need to use it multiple times */ source(): string /** * Returns the source map as a JSON string * Cache the result of this function if you need to use it multiple times */ sourceMap(): string | null } export declare class OxcTransformer { constructor(cwd?: string | undefined | null) transform(path: string, source: string | Uint8Array): Output transformAsync(path: string, source: string | Uint8Array | Buffer): Promise } export declare function createResolve(options: OxcResolveOptions, specifier: string, context: ResolveContext, nextResolve: (arg0: string, arg1?: ResolveContext | undefined | null) => ResolveFnOutput | Promise): ResolveFnOutput | Promise export declare function initTracing(): void export declare function load(url: string, context: LoadContext, nextLoad: (arg0: string, arg1?: LoadContext | undefined | null) => LoadFnOutput | Promise): LoadFnOutput | Promise export interface LoadContext { /** Export conditions of the relevant `package.json` */ conditions?: Array /** * The format optionally supplied by the `resolve` hook chain. Node.js passes it as * `undefined`, not `null`, when the chain reported none — a `.node` or `.wasm` file * resolved without its flag, any extension Node.js does not know — and a required * field would reject the whole context with "Missing field `format`" instead of * letting Node.js raise its own `ERR_UNKNOWN_FILE_EXTENSION`. */ format?: string | null /** An object whose key-value pairs represent the assertions for the module to import */ importAttributes: Record } export interface LoadFnOutput { format: string source?: string | Uint8Array | Buffer | null responseURL?: string } export interface OxcResolveOptions { getCurrentDirectory?: () => string } export interface ResolveContext { /** Export conditions of the relevant `package.json` */ conditions: Array /** An object whose key-value pairs represent the assertions for the module to import */ importAttributes: Record parentURL?: string } export interface ResolveFnOutput { format?: string | null shortCircuit?: boolean url: string importAttributes?: Record | null } export declare function transform(path: string, source: string | Uint8Array): Output export declare function transformAsync(path: string, source: string | Uint8Array | Buffer): Promise