mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-25 12:40:05 -05:00
Harden telemetryOnOpenFile (#36993)
This commit is contained in:
@@ -3117,8 +3117,9 @@ namespace ts.server {
|
||||
return;
|
||||
}
|
||||
|
||||
const info: OpenFileInfo = { checkJs: !!project.getSourceFile(scriptInfo.path)!.checkJsDirective };
|
||||
this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info } });
|
||||
const sourceFile = project.getSourceFile(scriptInfo.path);
|
||||
const checkJs = !!sourceFile && !!sourceFile.checkJsDirective;
|
||||
this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info: { checkJs } } });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user