Skip to content

Commit 16511eb

Browse files
author
John Doe
committed
refactor: move types
1 parent d78d348 commit 16511eb

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

packages/utils/src/lib/user-timing-extensibility-api.type.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ export type WithDevToolsPayload<T extends TrackEntryPayload | MarkerPayload> = {
117117
devtools?: T;
118118
};
119119

120+
/**
121+
* Combined detail payload type for performance entries with DevTools support.
122+
*/
123+
export type DetailPayloadWithDevtools = WithDevToolsPayload<
124+
TrackEntryPayload | MarkerPayload
125+
>;
120126
/**
121127
* Extended MarkOptions that supports DevTools payload in detail.
122128
* @example

packages/utils/src/perf-hooks.d.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
import type {
2-
MarkerPayload,
3-
TrackEntryPayload,
4-
WithDevToolsPayload,
5-
} from './lib/user-timing-extensibility-api.type';
1+
import type { DetailPayloadWithDevtools } from './lib/user-timing-extensibility-api.type';
62

73
export {};
84

9-
type DetailPayloadWithDevtools = WithDevToolsPayload<
10-
TrackEntryPayload | MarkerPayload
11-
>;
12-
135
declare module 'node:perf_hooks' {
146
interface PerformanceEntry {
157
readonly detail?: DetailPayloadWithDevtools;

0 commit comments

Comments
 (0)