Skip to content

Latest commit

 

History

History

type-helper

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

TypeScript Type Helpers

A collection of useful TypeScript type helpers.

Installation

yarn add -D @alwatr/type-helper

Import in Your File

import type {JSONObject} from '@alwatr/type-helper/types';

Add to Global Types

To add the type helpers to your global types, update your tsconfig.json:

{
  "extends": "@alwatr/tsconfig-base/tsconfig.json",
  "compilerOptions": {
    "types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
  },
  "include": ["src/**/*.ts"],
  "references": [{"path": "../package-tracer"}]
}

Usage Example

const obj: JSONObject = {
  foo: 'bar',
  baz: {
    qux: 1,
    arr: [1, 2, 3],
  },
  qux: true,
};

Read the source code for more details.

Sponsors

The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.

Exir Studio

Contributing

Contributions are welcome! Please read our contribution guidelines before submitting a pull request.

License

This project is licensed under the AGPL-3.0 License.