Useful general purpose datatypes with TypeScript support
Last updated 4 months ago by bjornua .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @verticalstrategy/datatypes 
SYNC missed versions from official npm registry.

Datatypes for TypeScript

pipeline status

Additional datatypes for JavaScript.


This module provides useful types that are a common in of other programming languages, but are not included in core JavaScript/TypeScript.


 yarn add @verticalstrategy/datatypes


Type Description Documentation
Option Represent an optional value Introduction / API
Result Represent a result or an error Introduction / API


Interface Description
ToPlain Classes that can export to a JSON-able JS type
FromPlain Classes that can import from a JSON-able JS type
Lazy Represents a lazy-loadable type

Implementation in other languages

You may be familiar with some of the content of this module. Here are some analogs in other Programming Languages:

Language Other Name Equivalent to Reference
Swift Optional Option Swift docs
Rust Option Option Rust docs
Rust Result Result Rust docs
C# Nullable Option C# docs
F# Option Option F# docs
F# Result Result F# docs


Contributions are always welcome in form of pull requests. Discussion or bug reports are created by opening new issues.

Current Tags

  • 1.0.2                                ...           latest (4 months ago)

5 Versions

  • 1.0.2                                ...           4 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           6 months ago
  • 0.0.2                                ...           8 months ago
  • 0.0.1                                ...           8 months ago
Today 0
This Week 5
This Month 5
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |