Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "tsdef", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "TypeScript common pattern shortcut definitions / utility gist library", | ||
@@ -5,0 +5,0 @@ "main": "es5/index.js", |
# tsdef | ||
TypeScript common patterns shortcuts definitions snippets utility gist library | ||
[![Build Status](https://travis-ci.org/joonhocho/tsdef.svg?branch=master)](https://travis-ci.org/joonhocho/tsdef) | ||
[![Coverage Status](https://coveralls.io/repos/github/joonhocho/tsdef/badge.svg?branch=master)](https://coveralls.io/github/joonhocho/tsdef?branch=master) | ||
[![npm version](https://badge.fury.io/js/tsdef.svg)](https://badge.fury.io/js/tsdef) | ||
[![Dependency Status](https://david-dm.org/joonhocho/tsdef.svg)](https://david-dm.org/joonhocho/tsdef) | ||
[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) | ||
## Get Started | ||
``` | ||
npm install -D tsdef | ||
``` | ||
or | ||
``` | ||
yarn add -D tsdef | ||
``` | ||
## How to Use | ||
```typescript | ||
import { Nullable, NonNull } from 'tsdef'; | ||
const nullableString: Nullable<string> = null; // ok | ||
const nonNullString: NonNull<string | null> = null; // error | ||
``` | ||
```typescript | ||
export type nil = null | undefined; | ||
@@ -6,0 +31,0 @@ |
24055
309