Files
oxc-project__oxc/napi/transform-react-upstream/index.d.ts

44 lines
1.0 KiB
TypeScript

/* auto-generated by NAPI-RS */
/* eslint-disable */
export interface Comment {
type: "Line" | "Block";
value: string;
start: number;
end: number;
}
export interface ErrorLabel {
message: string | null;
start: number;
end: number;
}
export interface OxcError {
severity: Severity;
message: string;
labels: Array<ErrorLabel>;
helpMessage: string | null;
codeframe: string | null;
}
export declare const enum Severity {
Error = "Error",
Warning = "Warning",
Advice = "Advice",
}
/** Result returned by the benchmark-only upstream React Compiler transform. */
export interface TransformResult {
fatal: boolean;
code: string;
errors: Array<OxcError>;
}
/**
* Compile a JavaScript or TypeScript React module synchronously.
*
* React 19 is fixed as the compiler target. JSX is preserved, TypeScript is
* stripped, and source maps are disabled so benchmark work is identical to
* the transform-only comparison in `bench-transformer`.
*/
export declare function transformSync(filename: string, sourceText: string): TransformResult;