Fix crash when running tsc with -diagnostics
This commit is contained in:
parent
de7fbc041a
commit
59fca7fc30
|
@ -10,7 +10,8 @@ namespace ts {
|
||||||
namespace ts.performance {
|
namespace ts.performance {
|
||||||
declare const onProfilerEvent: { (markName: string): void; profiler: boolean; };
|
declare const onProfilerEvent: { (markName: string): void; profiler: boolean; };
|
||||||
|
|
||||||
const profilerEvent: (markName: string) => void = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : noop;
|
// NOTE: cannot use ts.noop as core.ts loads after this
|
||||||
|
const profilerEvent: (markName: string) => void = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : () => { /*empty*/ };
|
||||||
|
|
||||||
let enabled = false;
|
let enabled = false;
|
||||||
let profilerStart = 0;
|
let profilerStart = 0;
|
||||||
|
|
Loading…
Reference in a new issue