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._ diff --git a/types/node/test/perf_hooks.ts b/types/node/test/perf_hooks.ts index 41c7de5f978d31..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) { @@ -64,7 +64,7 @@ obs.observe({ entryTypes: ['gc'], }); obs.observe({ - type: 'gc' + type: 'gc', }); const monitor: IntervalHistogram = monitorEventLoopDelay({