Added deferred to FileStats telemetry

This commit is contained in:
Armando Aguirre
2018-05-10 18:08:36 -07:00
parent 2be6aaf813
commit fdd078064d
2 changed files with 5 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ namespace ts.server {
readonly ts: number;
readonly tsx: number;
readonly dts: number;
readonly deferred: number;
}
export interface OpenFileInfo {

View File

@@ -11,7 +11,7 @@ namespace ts.server {
/* @internal */
export function countEachFileTypes(infos: ScriptInfo[]): FileStats {
const result: Mutable<FileStats> = { js: 0, jsx: 0, ts: 0, tsx: 0, dts: 0 };
const result: Mutable<FileStats> = { js: 0, jsx: 0, ts: 0, tsx: 0, dts: 0, deferred: 0 };
for (const info of infos) {
switch (info.scriptKind) {
case ScriptKind.JS:
@@ -28,6 +28,9 @@ namespace ts.server {
case ScriptKind.TSX:
result.tsx += 1;
break;
case ScriptKind.Deferred:
result.deferred += 1;
break;
}
}
return result;