MCPcopy
hub / github.com/TanStack/router / arkTypeValidator

Function arkTypeValidator

packages/arktype-adapter/src/index.ts:12–22  ·  view source on GitHub ↗
(
  options: TOptions,
)

Source from the content-addressed store, hash-verified

10 ValidatorAdapter<TOptions['inferIn'], TOptions['infer']>
11
12export const arkTypeValidator = <TOptions extends ArkTypeLike>(
13 options: TOptions,
14): ArkTypeValidatorAdapter<TOptions> => {
15 return {
16 types: {
17 input: options.inferIn,
18 output: options.infer,
19 },
20 parse: (input) => options.assert(input),
21 }
22}

Callers 2

index.test.tsxFile · 0.90
index.test-d.tsFile · 0.90

Calls 1

assertMethod · 0.80

Tested by

no test coverage detected