UNPKG

@nodesecure/js-x-ray

Version:
22 lines 735 B
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 type StripTypeScriptTypes = (source: string) => string; export interface JsSourceParserOptions { stripTypeScriptTypes?: StripTypeScriptTypes; } 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