fix(ext/node): Define performance.timeOrigin as getter property (#19714)

This commit is contained in:
await-ovo 2023-07-05 01:19:18 +08:00 committed by GitHub
parent a3986b641c
commit 686ec85f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View file

@ -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