Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private findComponentsInFile(sourceFile: SourceFile) {
const analyzeResult = analyzeComponents(sourceFile, {
checker: this.checker,
ts: this.ts,
config: { diagnostics: true, analyzeLibDom: true, excludedDeclarationNames: ["HTMLElement"] }
});
// Forget
const existingResult = this.definitionStore.getAnalysisResultForFile(sourceFile);
if (existingResult != null) {
this.htmlStore.forgetCollection(
{
tags: existingResult.componentDefinitions.map(d => d.tagName),
events: existingResult.globalEvents.map(e => e.name),
attrs: []
},
HtmlDataSourceKind.DECLARED
);