diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 984e3d45279..2572ed5f7e1 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1060,12 +1060,14 @@ namespace ts { function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames: string[], containingFile: string | SourceFile): readonly (ResolvedTypeReferenceDirective | undefined)[] { if (!typeDirectiveNames.length) return []; - performance.mark("beforeResolveTypeReference"); const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile; const redirectedReference = !isString(containingFile) ? getRedirectReferenceForResolution(containingFile) : undefined; + tracing.begin(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName }); + performance.mark("beforeResolveTypeReference"); const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference); performance.mark("afterResolveTypeReference"); performance.measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); + tracing.end(); return result; }