UNPKG

514 BTypeScriptView Raw
1/**
2 * @since 0.5.0
3 */
4import * as t from 'io-ts'
5/**
6 * @since 0.5.0
7 */
8export interface DateFromUnixTimeC extends t.Type<Date, number, unknown> {}
9/**
10 * @example
11 * import { DateFromUnixTime } from 'io-ts-types/lib/DateFromUnixTime'
12 * import { right } from 'fp-ts/lib/Either'
13 *
14 * const date = new Date(1973, 10, 30)
15 * const input = date.getTime() / 1000
16 * assert.deepStrictEqual(DateFromUnixTime.decode(input), right(date))
17 *
18 * @since 0.5.0
19 */
20export declare const DateFromUnixTime: DateFromUnixTimeC