Skip to content

Commit 24b5959

Browse files
author
John Doe
committed
refactor: wip
1 parent a4ef406 commit 24b5959

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type {
99
} from './user-timing-extensibility-api.type.js';
1010

1111
const dataTypeTrackEntry = 'track-entry';
12+
const dataTypeMarker = 'marker';
1213

1314
export function objToPropertiesPayload(
1415
object: Record<string, string | number | boolean | object | undefined>,
@@ -34,7 +35,7 @@ export function markerPayload(
3435
options?: Omit<MarkerPayload, 'dataType'>,
3536
): MarkerPayload {
3637
return {
37-
dataType: 'marker',
38+
dataType: dataTypeMarker,
3839
...options,
3940
};
4041
}
@@ -54,7 +55,7 @@ export function markerErrorPayload<T extends DevToolsColor>(
5455
options?: Omit<MarkerPayload, 'dataType' | 'color'>,
5556
): MarkerPayload {
5657
return {
57-
dataType: 'marker',
58+
dataType: dataTypeMarker,
5859
color: 'error' as T,
5960
...options,
6061
} satisfies MarkerPayload;
@@ -129,7 +130,7 @@ export function errorToMarkerPayload<T extends DevToolsColor>(
129130
): MarkerPayload {
130131
const { properties, tooltipText } = detail ?? {};
131132
return {
132-
dataType: 'marker',
133+
dataType: dataTypeMarker,
133134
color: 'error' as T,
134135
...errorToEntryMeta(error, {
135136
properties,

0 commit comments

Comments
 (0)