MCPcopy Index your code
hub / github.com/Effect-TS/effect / primitive

Function primitive

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

Source from the content-addressed store, hash-verified

443
444/** @internal */
445export const primitive = <A>(
446 description: string,
447 parse: (text: string) => Either.Either<A, ConfigError.ConfigError>
448): Config.Config<A> => {
449 const primitive = Object.create(proto)
450 primitive._tag = OpCodes.OP_PRIMITIVE
451 primitive.description = description
452 primitive.parse = parse
453 return primitive
454}
455
456/** @internal */
457export 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