Skip to content

Commit c95589d

Browse files
author
John Doe
committed
refactor: fix lint
1 parent 5f1c67a commit c95589d

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,11 @@ declare module 'node:perf_hooks' {
2424
}
2525

2626
const performance: {
27-
mark(
28-
name: string,
29-
options?: {
30-
detail?: DetailPayloadWithDevtools;
31-
},
32-
): PerformanceMark;
27+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3328

3429
measure(
3530
name: string,
36-
startOrOptions?:
37-
| string
38-
| number
39-
| {
40-
detail?: DetailPayloadWithDevtools;
41-
start?: string | number;
42-
end?: string | number;
43-
duration?: number;
44-
},
31+
startOrOptions?: string | number | PerformanceMeasureOptions,
4532
end?: string | number,
4633
): PerformanceMeasure;
4734
};

packages/utils/src/perf_hooks.type.test.ts renamed to packages/utils/src/perf-hooks.unit.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type PerformanceMarkOptions, performance } from 'node:perf_hooks';
22
import { describe, expectTypeOf, it } from 'vitest';
33

4-
describe('perf_hooks.type', () => {
4+
describe('perf-hooks definitions', () => {
55
it('PerformanceMarkOptions should be type safe', () => {
66
expectTypeOf<{
77
startTime: number;
@@ -12,7 +12,6 @@ describe('perf_hooks.type', () => {
1212
};
1313
};
1414
}>().toMatchTypeOf<PerformanceMarkOptions>();
15-
1615
expectTypeOf<{
1716
startTime: number;
1817
detail: {

0 commit comments

Comments
 (0)