Skip to main content Link Menu Expand (external link) Document Search Copy Copied

NumberFromString overview

Added in v0.5.0


Table of contents


NumberFromStringC (interface)

Signature

export interface NumberFromStringC extends t.Type<number, string, unknown> {}

Added in v0.5.0

NumberFromString

Signature

export const NumberFromString: NumberFromStringC = ...

Example

import { NumberFromString } from 'io-ts-types/lib/NumberFromString'

NumberFromString.decode('1') // right(1)
NumberFromString.decode('1.1') // right(1.1)

Added in v0.5.0