@nodesecure/js-x-ray
Version:
JavaScript AST XRay analysis
24 lines • 697 B
TypeScript
import { type ESTree } from "meriyah";
export type SourceParserSyntaxError = SyntaxError & {
start: number;
end: number;
range: [number, number];
description: string;
loc: ESTree.SourceLocation;
};
export interface SourceParser {
parse(source: string, options: unknown): ESTree.Statement[];
}
export interface JsSourceParserOptions {
/**
* @default false
*/
stripTypeScriptTypes?: boolean;
}
export declare class JsSourceParser implements SourceParser {
#private;
static FileExtensions: Set<string>;
constructor(options?: JsSourceParserOptions);
parse(source: string): ESTree.Program["body"];
}
//# sourceMappingURL=JsSourceParser.d.ts.map