mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Added deferred to FileStats telemetry
This commit is contained in:
@@ -83,6 +83,7 @@ namespace ts.server {
|
||||
readonly ts: number;
|
||||
readonly tsx: number;
|
||||
readonly dts: number;
|
||||
readonly deferred: number;
|
||||
}
|
||||
|
||||
export interface OpenFileInfo {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user