oxc/npm/napi/index.d.ts
Boshen d49195f7f2
feat: napi (#302)
* chore: only ignore js files from the root

* feat: napi
2023-04-22 14:41:45 +08:00

29 lines
696 B
TypeScript

/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
/**
* Babel Parser Options
*
* <https://github.com/babel/babel/blob/main/packages/babel-parser/typings/babel-parser.d.ts>
*/
export interface ParserOptions {
sourceType?: string
sourceFilename?: string
}
export interface ParseResult {
program: any
errors: Array<string>
}
/**
* # Panics
* * File extension is invalid
* * Serde JSON serialization
*/
export function parseSync(sourceText: string, options?: ParserOptions | undefined | null): ParseResult
/**
* # Panics
* * Tokio crashes
*/
export function parseAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise<ParseResult>