Skip to content

SourceLocationRegistry

Defined in: source-location.ts:70

Registry for source location formatters.

Allows format-specific packages to register their own location types and formatting logic without modifying core.

new SourceLocationRegistry(): SourceLocationRegistry

SourceLocationRegistry

format(location): string

Defined in: source-location.ts:109

Format a location using the registered formatter.

BaseSourceLocation

The location to format

string

Formatted string, or a fallback if no formatter is registered


get(kind): SourceLocationFormatter<BaseSourceLocation> | undefined

Defined in: source-location.ts:92

Get the formatter for a location kind.

string

The location kind

SourceLocationFormatter<BaseSourceLocation> | undefined

The formatter, or undefined if not registered


has(kind): boolean

Defined in: source-location.ts:99

Check if a formatter is registered for a kind.

string

boolean


register<T>(kind, formatter): void

Defined in: source-location.ts:79

Register a formatter for a location kind.

T extends BaseSourceLocation

string

The location kind (e.g., ‘csv’, ‘xml’)

SourceLocationFormatter<T>

Function to format locations of this kind

void