@jsverse/transloco-keys-manager
Version:
Extract translatable keys from projects that uses Transloco
9 lines • 524 B
JavaScript
import { tsquery } from '@phenomnomnominal/tsquery';
import { templateExtractor } from '../template/index.js';
export function inlineTemplateExtractor(ast, config) {
const [inlineTemplate] = tsquery(ast, 'ClassDeclaration Decorator CallExpression:has([name=Component]) ObjectLiteralExpression PropertyAssignment:has([name=template]) NoSubstitutionTemplateLiteral');
if (inlineTemplate) {
templateExtractor({ ...config, content: inlineTemplate.getText() });
}
}
//# sourceMappingURL=inline-template.js.map