MCPcopy Create free account
hub / github.com/Effect-TS/effect / validatePrimitive

Function validatePrimitive

packages/cli/src/internal/options.ts:1331–1334  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

1329 }
1330 const primitive = self.argumentOption.primitiveType
1331 const validatePrimitive = (value: string) =>
1332 InternalPrimitive.validate(primitive, Option.some(value), config).pipe(
1333 Effect.mapError((e) => InternalValidationError.invalidValue(InternalHelpDoc.p(e)))
1334 )
1335 return Effect.forEach(values, (value) => validatePrimitive(value))
1336 }
1337 // If we did not receive any variadic arguments then perform the bounds

Callers 1

validateMinMaxFunction · 0.85

Calls 2

validateMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected