Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function classPropertyCompiler(templateInfo: { templateString: string; classBody: any }, useTypeScript: boolean): void {
const typeAnnotation = useTypeScript ? types.builders.typeAnnotation(
types.builders.genericTypeAnnotation(types.builders.identifier('string'), null),
) : null;
templateInfo.classBody.body.body.push(types.builders.classProperty(
types.builders.identifier('$template'),
types.builders.identifier(`\`${templateInfo.templateString}\``),
typeAnnotation,
));
}
export function classPropertyCompiler(templateInfo: { templateString: string; classBody: any }, useTypeScript: boolean): void {
const typeAnnotation = useTypeScript ? types.builders.typeAnnotation(
types.builders.genericTypeAnnotation(types.builders.identifier('string'), null),
) : null;
templateInfo.classBody.body.body.push(types.builders.classProperty(
types.builders.identifier('$template'),
types.builders.identifier(`\`${templateInfo.templateString}\``),
typeAnnotation,
));
}