@discall/types
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-a2 • Public • Published

@discall/types

types of discall interface and checkers

check most of types you want.

Example


isNumber(1) // true
isNumber('') // false

isUnion(isNumber, isString)(item) // item is number | string

isTypeTuple(isNumber, isNumber)(item) // item is [number, number]

isTypeArray(isBoolean)(item) // item is boolean[]

// more thins:
/*
    isFunction,
    isTypeNull,
    isTypeUndefined,
    isTypeRecord,
    isTypeObject,
    isLiteral,
    isAny,

    and Discall interfaces
*/

Package Sidebar

Install

npm i @discall/types

Weekly Downloads

2

Version

1.0.0-a2

License

Apache-2.0

Unpacked Size

161 kB

Total Files

62

Last publish

Collaborators

  • yukinya