From 93d03e5147773fd1da85184e35d2d015fff54aa5 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 22 Jun 2022 06:43:21 -0700 Subject: [PATCH] Clean up perf hooks a little --- src/javascript/jsc/perf_hooks.exports.js | 30 +++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/javascript/jsc/perf_hooks.exports.js b/src/javascript/jsc/perf_hooks.exports.js index 2002721302..b49e2fc4ad 100644 --- a/src/javascript/jsc/perf_hooks.exports.js +++ b/src/javascript/jsc/perf_hooks.exports.js @@ -1,15 +1,27 @@ export var performance = globalThis.performance; -export function PerformanceObserver() { - throw new Error("PerformanceEntry is not implemented yet"); +export class PerformanceObserver { + constructor() { + throw new Error("PerformanceEntry is not implemented yet"); + } } -export function PerformanceEntry() { - throw new Error("PerformanceEntry is not implemented yet"); +export class PerformanceEntry { + constructor() { + throw new Error("PerformanceEntry is not implemented yet"); + } +} +export class PerformanceNodeTiming { + constructor() { + throw new Error( + "PerformanceNodeTiming is not supported in this environment." + ); + } } -export function PerformanceNodeTiming() { - throw new Error( - "PerformanceNodeTiming is not supported in this environment." - ); -} +export default { + performance, + PerformanceEntry, + PerformanceEntry, + PerformanceNodeTiming, +};