mirror of
https://github.com/swc-project/swc.git
synced 2024-11-29 11:47:21 +03:00
50 lines
1000 B
TypeScript
50 lines
1000 B
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
|
|
export interface Attribute {
|
|
namespace?: string;
|
|
prefix?: string;
|
|
name: string;
|
|
value?: string;
|
|
}
|
|
|
|
export interface Diagnostic {
|
|
level: string;
|
|
message: string;
|
|
span: any;
|
|
}
|
|
|
|
export interface Element {
|
|
tagName: string;
|
|
namespace: string;
|
|
attributes: Array<Attribute>;
|
|
isSelfClosing: boolean;
|
|
}
|
|
|
|
export declare function minify(
|
|
code: Buffer | string,
|
|
opts: Buffer,
|
|
signal?: AbortSignal | undefined | null
|
|
): Promise<TransformOutput>;
|
|
|
|
export declare function minifyFragment(
|
|
code: Buffer | string,
|
|
opts: Buffer,
|
|
signal?: AbortSignal | undefined | null
|
|
): Promise<TransformOutput>;
|
|
|
|
export declare function minifyFragmentSync(
|
|
code: Buffer | string,
|
|
opts: Buffer
|
|
): TransformOutput;
|
|
|
|
export declare function minifySync(
|
|
code: Buffer | string,
|
|
opts: Buffer
|
|
): TransformOutput;
|
|
|
|
export interface TransformOutput {
|
|
code: string;
|
|
errors?: Array<Diagnostic>;
|
|
}
|