Skip to content

Commit

Permalink
Update package
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisl9029 committed Aug 6, 2024
1 parent 9abedff commit d0512e6
Show file tree
Hide file tree
Showing 4 changed files with 472 additions and 521 deletions.
116 changes: 37 additions & 79 deletions packages/core/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,49 @@
/* eslint-disable */

export class Compiler {
constructor();
constructor()
}
export type JsCompiler = Compiler;

export function bundle(
confItems: Buffer,
signal?: AbortSignal | undefined | null
): Promise<{ [index: string]: { code: string; map?: string } }>;

export function getTargetTriple(): string;

export function initCustomTraceSubscriber(
traceOutFilePath?: string | undefined | null
): void;

export function minify(
code: Buffer,
opts: Buffer,
signal?: AbortSignal | undefined | null
): Promise<TransformOutput>;

export function minifySync(code: Buffer, opts: Buffer): TransformOutput;

export function parse(
src: string,
options: Buffer,
filename?: string | undefined | null,
signal?: AbortSignal | undefined | null
): Promise<string>;

export function parseFile(
path: string,
options: Buffer,
signal?: AbortSignal | undefined | null
): Promise<string>;

export function parseFileSync(path: string, opts: Buffer): string;

export function parseSync(
src: string,
opts: Buffer,
filename?: string | undefined | null
): string;

export function print(
programJson: string,
options: Buffer,
signal?: AbortSignal | undefined | null
): Promise<TransformOutput>;

export function printSync(program: string, options: Buffer): TransformOutput;

export function transform(
src: string,
isModule: boolean,
options: Buffer,
signal?: AbortSignal | undefined | null
): Promise<TransformOutput>;

export function transformFile(
src: string,
isModule: boolean,
options: Buffer,
signal?: AbortSignal | undefined | null
): Promise<TransformOutput>;

export function transformFileSync(
s: string,
isModule: boolean,
opts: Buffer
): TransformOutput;
export type JsCompiler = Compiler

export declare function bundle(confItems: Buffer, signal?: AbortSignal | undefined | null): Promise<{ [index: string]: { code: string, map?: string } }>

export declare function getTargetTriple(): string

export declare function initCustomTraceSubscriber(traceOutFilePath?: string | undefined | null): void

export declare function minify(code: Buffer, opts: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>

export declare function minifySync(code: Buffer, opts: Buffer): TransformOutput

export declare function parse(src: string, options: Buffer, filename?: string | undefined | null, signal?: AbortSignal | undefined | null): Promise<string>

export declare function parseFile(path: string, options: Buffer, signal?: AbortSignal | undefined | null): Promise<string>

export declare function parseFileSync(path: string, opts: Buffer): string

export declare function parseSync(src: string, opts: Buffer, filename?: string | undefined | null): string

export declare function print(programJson: string, options: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>

export declare function printSync(program: string, options: Buffer): TransformOutput

export declare function transform(src: string, isModule: boolean, options: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>

export declare function transformFile(src: string, isModule: boolean, options: Buffer, signal?: AbortSignal | undefined | null): Promise<TransformOutput>

export declare function transformFileSync(s: string, isModule: boolean, opts: Buffer): TransformOutput

export interface TransformOutput {
code: string;
map?: string;
code: string
map?: string
output?: string
}

/** Hack for `Type Generation` */
export interface TransformOutput {
code: string;
map?: string;
code: string
map?: string
}

export function transformSync(
s: string,
isModule: boolean,
opts: Buffer
): TransformOutput;
export declare function transformSync(s: string, isModule: boolean, opts: Buffer): TransformOutput

Loading

0 comments on commit d0512e6

Please sign in to comment.