1 | /**
|
2 | * @since 0.5.0
|
3 | */
|
4 | import * as t from 'io-ts'
|
5 | /**
|
6 | * @since 0.5.0
|
7 | */
|
8 | export interface BooleanFromStringC extends t.Type<boolean, string, unknown> {}
|
9 | /**
|
10 | * @example
|
11 | * import { BooleanFromString } from 'io-ts-types/lib/BooleanFromString'
|
12 | * import { right } from 'fp-ts/lib/Either'
|
13 | * import { PathReporter } from 'io-ts/lib/PathReporter'
|
14 | *
|
15 | * assert.deepStrictEqual(BooleanFromString.decode('true'), right(true))
|
16 | * assert.deepStrictEqual(BooleanFromString.decode('false'), right(false))
|
17 | * assert.deepStrictEqual(PathReporter.report(BooleanFromString.decode('a')), ['Invalid value "a" supplied to : BooleanFromString'])
|
18 | *
|
19 | * @since 0.5.0
|
20 | */
|
21 | export declare const BooleanFromString: BooleanFromStringC
|