mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
72 lines
1.8 KiB
TypeScript
72 lines
1.8 KiB
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
export interface ArrowFunctionsBindingOptions {
|
|
spec?: boolean
|
|
}
|
|
|
|
export interface Es2015BindingOptions {
|
|
arrowFunction?: ArrowFunctionsBindingOptions
|
|
}
|
|
|
|
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
export declare function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
|
|
|
|
export interface IsolatedDeclarationsResult {
|
|
sourceText: string
|
|
errors: Array<string>
|
|
}
|
|
|
|
export interface ReactBindingOptions {
|
|
runtime?: 'classic' | 'automatic'
|
|
development?: boolean
|
|
throwIfNamespace?: boolean
|
|
pure?: boolean
|
|
importSource?: string
|
|
pragma?: string
|
|
pragmaFrag?: string
|
|
useBuiltIns?: boolean
|
|
useSpread?: boolean
|
|
}
|
|
|
|
export interface Sourcemap {
|
|
file?: string
|
|
mappings?: string
|
|
sourceRoot?: string
|
|
sources?: Array<string | undefined | null>
|
|
sourcesContent?: Array<string | undefined | null>
|
|
names?: Array<string>
|
|
}
|
|
|
|
export declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult
|
|
|
|
export interface TransformOptions {
|
|
sourceType?: 'script' | 'module' | 'unambiguous' | undefined
|
|
/** Force jsx parsing, */
|
|
jsx?: boolean
|
|
typescript?: TypeScriptBindingOptions
|
|
react?: ReactBindingOptions
|
|
es2015?: Es2015BindingOptions
|
|
/**
|
|
* Enable Sourcemap
|
|
*
|
|
* * `true` to generate a sourcemap for the code and include it in the result object.
|
|
*
|
|
* Default: false
|
|
*/
|
|
sourcemap?: boolean
|
|
}
|
|
|
|
export interface TransformResult {
|
|
sourceText: string
|
|
map?: Sourcemap
|
|
errors: Array<string>
|
|
}
|
|
|
|
export interface TypeScriptBindingOptions {
|
|
jsxPragma?: string
|
|
jsxPragmaFrag?: string
|
|
onlyRemoveTypeImports?: boolean
|
|
allowNamespaces?: boolean
|
|
allowDeclareFields?: boolean
|
|
}
|
|
|