swc/packages/html/binding.d.ts

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>;
}