angular-estree-parser
Version:
A parser that converts Angular source code into an ESTree-compatible form
30 lines (29 loc) • 1.15 kB
TypeScript
import { type ASTWithSource, type TemplateBindingParseResult } from '@angular/compiler';
import { type CommentLine } from './types.js';
export declare const parseBinding: (originalText: string) => {
result: ASTWithSource<import("@angular/compiler").AST>;
comments: CommentLine[];
text: string;
};
export declare const parseSimpleBinding: (originalText: string) => {
result: ASTWithSource<import("@angular/compiler").AST>;
comments: CommentLine[];
text: string;
};
export declare const parseAction: (originalText: string) => {
result: ASTWithSource<import("@angular/compiler").AST>;
comments: CommentLine[];
text: string;
};
export declare const parseInterpolationExpression: (originalText: string) => {
result: ASTWithSource<import("@angular/compiler").AST>;
comments: CommentLine[];
text: string;
};
export declare const parseTemplateBindings: (originalText: string) => {
result: TemplateBindingParseResult;
comments: CommentLine[];
text: string;
};
export type AstParseResult = ReturnType<typeof parseBinding>;
export type MicroSyntaxParseResult = ReturnType<typeof parseTemplateBindings>;