MCPcopy Create free account
hub / github.com/arktypeio/arktype / writeSlot

Function writeSlot

ark/schema/shared/render.ts:141–152  ·  view source on GitHub ↗
(
	error: ArkError,
	slot: ErrorSlot,
	config: SlotConfig,
	locale: Locale.Resolved
)

Source from the content-addressed store, hash-verified

139 !isDefaultDescription(error, error.description)
140
141const writeSlot = (
142 error: ArkError,
143 slot: ErrorSlot,
144 config: SlotConfig,
145 locale: Locale.Resolved
146): string =>
147 typeof config === "string" ?
148 slot === "expected" ?
149 locale.cite(config)
150 : config
151 : slot === "actual" ? writeActual(error, config as never, locale)
152 : config(error as never, locale as never)
153
154const localeWriter = (
155 error: ArkError,

Callers 2

writeFunction · 0.85
renderFunction · 0.85

Calls 2

writeActualFunction · 0.90
configFunction · 0.50

Tested by

no test coverage detected