From aee866add66a0158f880eee3f4427ea5481f7fd3 Mon Sep 17 00:00:00 2001 From: Vincent Ahrend Date: Sun, 12 Sep 2021 19:11:13 +0200 Subject: [PATCH 1/3] Fix property 'detail' of PerformanceEntry This spelling mistake in a property name has been fixed in node.js per https://github.com/nodejs/node/pull/40019 --- types/node/perf_hooks.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node/perf_hooks.d.ts b/types/node/perf_hooks.d.ts index 02f330c7b1d468..5bfb931c19858b 100644 --- a/types/node/perf_hooks.d.ts +++ b/types/node/perf_hooks.d.ts @@ -84,7 +84,7 @@ declare module 'perf_hooks' { * Additional detail specific to the `entryType`. * @since v16.0.0 */ - readonly details?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. + readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. } /** * _This property is an extension by Node.js. It is not available in Web browsers._ From b9f14e1618cb1b03da583da2f6fc3356b9911912 Mon Sep 17 00:00:00 2001 From: Vincent Ahrend Date: Sun, 12 Sep 2021 23:05:37 +0200 Subject: [PATCH 2/3] Add missing comma --- types/node/test/perf_hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/node/test/perf_hooks.ts b/types/node/test/perf_hooks.ts index 41c7de5f978d31..b72e0ffdc122cc 100644 --- a/types/node/test/perf_hooks.ts +++ b/types/node/test/perf_hooks.ts @@ -64,7 +64,7 @@ obs.observe({ entryTypes: ['gc'], }); obs.observe({ - type: 'gc' + type: 'gc', }); const monitor: IntervalHistogram = monitorEventLoopDelay({ From 1c20367e0f9b8dbc8ba68f97259613910f3cab6c Mon Sep 17 00:00:00 2001 From: Vincent Ahrend Date: Sun, 12 Sep 2021 23:11:45 +0200 Subject: [PATCH 3/3] Fix 'detail' property name in perf_hooks test --- types/node/test/perf_hooks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/node/test/perf_hooks.ts b/types/node/test/perf_hooks.ts index b72e0ffdc122cc..fca32a1516fe61 100644 --- a/types/node/test/perf_hooks.ts +++ b/types/node/test/perf_hooks.ts @@ -48,9 +48,9 @@ const performanceObserverCallback: PerformanceObserverCallback = (list, obs) => const name: string = entries[0].name; const startTime: number = entries[0].startTime; const entryTypes: EntryType = entries[0].entryType; - const details: NodeGCPerformanceDetail = entries[0].details as NodeGCPerformanceDetail; - const kind: number | undefined = details.kind; - const flags: number | undefined = details.flags; + const detail: NodeGCPerformanceDetail = entries[0].detail as NodeGCPerformanceDetail; + const kind: number | undefined = detail.kind; + const flags: number | undefined = detail.flags; if (kind === constants.NODE_PERFORMANCE_GC_MAJOR) { if (flags === constants.NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY) {