@vendure/ngx-translate-extract
Version:
Extract strings from projects using ngx-translate
15 lines (14 loc) • 881 B
TypeScript
import { AST, TmplAstNode, BindingPipe, Binary } from '@angular/compiler';
import { ParserInterface } from './parser.interface.js';
import { TranslationCollection } from '../utils/translation.collection.js';
export declare const TRANSLATE_PIPE_NAMES: string[];
export declare class PipeParser implements ParserInterface {
extract(source: string, filePath: string): TranslationCollection;
protected findPipesInNode(node: TmplAstNode): BindingPipe[];
protected parseTranslationKeysFromPipe(pipeContent: AST): string[];
protected getTranslatablesFromAst(ast: AST): BindingPipe[];
protected getTranslatablesFromAsts(asts: AST[]): BindingPipe[];
protected flatten<T extends AST>(array: T[][]): T[];
protected parseTemplate(template: string, path: string): TmplAstNode[];
protected isLogicalOrNullishCoalescingExpression(expr: unknown): expr is Binary;
}