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, +};