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 closureTypeToTypeScript(
closureType: string|null|undefined, templateTypes: string[] = []): ts.Type {
if (!closureType) {
return ts.anyType;
}
let ast;
try {
ast = parseType(closureType);
} catch {
return ts.anyType;
}
return convert(ast, templateTypes);
}