1 | /**
|
2 | * @since 0.4.4
|
3 | */
|
4 | import * as t from 'io-ts'
|
5 | /**
|
6 | * @since 0.4.4
|
7 | */
|
8 | export interface RegExpC extends t.Type<RegExp, RegExp, unknown> {}
|
9 | /**
|
10 | * @example
|
11 | * import { regexp } from 'io-ts-types/lib/regexp'
|
12 | * import { right } from 'fp-ts/lib/Either'
|
13 | *
|
14 | * const input1 = /\w+/
|
15 | * const input2 = new RegExp('\\w+')
|
16 | * assert.deepStrictEqual(regexp.decode(input1), right(input1))
|
17 | * assert.deepStrictEqual(regexp.decode(input2), right(input2))
|
18 | *
|
19 | * @since 0.4.4
|
20 | */
|
21 | export declare const regexp: RegExpC
|