known-types

This is a package that hold common types and utility functions for build typescript project and interfaces.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
known-types
1.2.06 years ago6 years agoMinified + gzip package size for known-types in KB

Readme

known-types
This is a package that hold common types and utility functions for build typescript project and interfaces.
For example:
import {IMap, createMap} from 'known-types'

const map: IMap<string> = createMap({init: '1', 2: '2'})

console.log(map['init'], map['2'])

Supported types

  • ANY: the type is any, and value is undefined
  • NULL: the value and type both are null
  • IMap: the structure is:
```ts
interface IMap<T> {
    [key: number]: T;
    [key: string]: T;
}
```
More detailed information please download this project by npm install known-types.

LICENSE

MIT