Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Type aliases

DecodedValue

DecodedValue<T>: T extends Decoder<infer U> ? U : never

Deduce the return type of a decoder. If there is a deep nesting of objects the type will be inferred but will not display correctly in the signature.

Example:

const paramDecoder = Decoder.object({
 body: userDecoder
})
const handleRequest = (params: DecodedValue<typeof paramDecoder>) => {
 // params.body is inferred
}

Type parameters

  • T

Variables

matchOnlyNumberRe

matchOnlyNumberRe: RegExp = new RegExp('^(' + numberReSnippet + ')$')

numberReSnippet

numberReSnippet: string = "(?:NaN|-?(?:(?:\d+|\d*\.\d+)(?:[E|e][+|-]?\d+)?|Infinity))"

Functions

Const isDate

  • isDate(d: Date): boolean

Const isISO

  • isISO(str: string): boolean

Const isInteger

  • isInteger(n: number): boolean

Const isStringNumber

  • isStringNumber(n: string): boolean

Generated using TypeDoc