LibPerformanceOrNodePerfHooksPerformance

TLibPerformanceOrNodePerfHooksPerformance
Bun

Symbol

__internal.LibPerformanceOrNodePerfHooksPerformance

Referenced types

type UseLibDomIfAvailable<GlobalThisKeyName extends PropertyKey, Otherwise> = LibDomIsLoaded extends true ? typeof globalThis extends { [K in GlobalThisKeyName]: infer T } ? T : Otherwise : Otherwise

Helper type for avoiding conflicts in types.

Uses the lib.dom.d.ts definition if it exists, otherwise defines it locally.

This is to avoid type conflicts between lib.dom.d.ts and @types/bun.

Unfortunately some symbols cannot be defined when both Bun types and lib.dom.d.ts types are loaded, and since we can't redeclare the symbol in a way that satisfies both, we need to fallback to the type that lib.dom.d.ts provides.