Function
primitive
(
description: string,
parse: (text: string) => Either.Either<A, ConfigError.ConfigError>
)
Source from the content-addressed store, hash-verified
| 452 | |
| 453 | /** @internal */ |
| 454 | export 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 */ |
| 466 | export const repeat = <A>(self: Config.Config<A>): Config.Config<Array<A>> => { |
Tested by
no test coverage detected