UNPKG

@zendesk/react-measure-timing-hooks

Version:

react hooks for measuring time to interactive and time to render of components

25 lines (24 loc) 1.09 kB
import type { IGardenTheme } from '@zendeskgarden/react-theming'; import type { SpanAnnotation } from '../spanAnnotationTypes'; import type { Attributes, Span, SpanBase } from '../spanTypes'; import type { TraceRecording } from '../traceRecordingTypes'; import type { Timestamp } from '../types'; import type { SupportedSpanTypes } from './constants'; type DistributiveOmit<T, K extends keyof any> = T extends T ? Omit<T, K> : never; export type MinimalSpanAnnotation = Omit<SpanAnnotation, 'id' | 'occurrence' | 'recordedInState' | 'labels'> & Partial<SpanAnnotation>; export type MinimalSpan = DistributiveOmit<Span<any> | SpanBase<any>, 'startTime' | 'attributes'> & { startTime: Pick<Timestamp, 'now'> & Partial<Timestamp>; attributes?: Attributes; }; export interface MappedSpanAndAnnotation { span: MinimalSpan; annotation: MinimalSpanAnnotation; groupName: string; type: SupportedSpanTypes; } export type RecordingInputFile = TraceRecording<any, any>; declare module 'styled-components' { interface DefaultTheme extends IGardenTheme { } } export {};