typedly
v0.0.10
Published
A collection of utility types.
Downloads
478
Readme
Typedly
Usage / Configuration
The types in this library can accessed in one of the following methods:
Namespace import:
// index.ts import { typedly } from "typedly" type MyUnion = { a: string, common: boolean } | { b: string, common: boolean } export type Usage = typedly.DistributiveOmit<MyUnion, "common">
Direct import:
// index.ts import { DistributiveOmit } from "typedly/dist/typedly" type MyUnion = { a: string, common: boolean } | { b: string, common: boolean } export type Usage = DistributiveOmit<MyUnion, "common">
Injecting the types globally using
tsconfig.json
:- Injecting the types globally using
tsconfig.json
:
// tsconfig.json { "types": ["typedly/dist/global.d.ts"] }
// index.ts type MyUnion = { a: string, common: boolean } | { b: string, common: boolean } export type Usage = DistributiveOmit<MyUnion, "common">
- Injecting the types globally using