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