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

Function primitive

packages/effect/src/internal/config.ts:454–463  ·  view source on GitHub ↗
(
  description: string,
  parse: (text: string) => Either.Either<A, ConfigError.ConfigError>
)

Source from the content-addressed store, hash-verified

452
453/** @internal */
454export const primitive = <A>(
455 description: string,
456 parse: (text: string) => Either.Either<A, ConfigError.ConfigError>
457): Config.Config<A> => {
458 const primitive = Object.create(proto)
459 primitive._tag = OpCodes.OP_PRIMITIVE
460 primitive.description = description
461 primitive.parse = parse
462 return primitive
463}
464
465/** @internal */
466export const repeat = <A>(self: Config.Config<A>): Config.Config<Array<A>> => {

Callers 10

booleanFunction · 0.85
urlFunction · 0.85
portFunction · 0.85
dateFunction · 0.85
numberFunction · 0.85
integerFunction · 0.85
literalFunction · 0.85
secretFunction · 0.85
stringFunction · 0.85
nonEmptyStringFunction · 0.85

Calls 1

createMethod · 0.80

Tested by

no test coverage detected