diff options
author | await-ovo <13152410380@163.com> | 2023-07-05 01:19:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 20:19:18 +0300 |
commit | 686ec85f5220327933d1dfae0e73dabbfc33bc45 (patch) | |
tree | 14c02bf76cea3a176ba2f615f40dc4197209032c /ext/node/polyfills/perf_hooks.ts | |
parent | a3986b641c892c09b514aab76c04324e75e18f9d (diff) |
fix(ext/node): Define performance.timeOrigin as getter property (#19714)
Diffstat (limited to 'ext/node/polyfills/perf_hooks.ts')
-rw-r--r-- | ext/node/polyfills/perf_hooks.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/node/polyfills/perf_hooks.ts b/ext/node/polyfills/perf_hooks.ts index 059677c9b..64c2c3e06 100644 --- a/ext/node/polyfills/perf_hooks.ts +++ b/ext/node/polyfills/perf_hooks.ts @@ -54,8 +54,10 @@ const performance: nodeTiming: {}, now: () => shimPerformance.now(), timerify: () => notImplemented("timerify from performance"), - // deno-lint-ignore no-explicit-any - timeOrigin: (shimPerformance as any).timeOrigin, + get timeOrigin() { + // deno-lint-ignore no-explicit-any + return (shimPerformance as any).timeOrigin; + }, markResourceTiming: () => {}, // @ts-ignore waiting on update in `deno`, but currently this is // a circular dependency |