helpertypes

A collection of TypeScript helper types

MIT 19 个版本
安装
npm install helpertypes
yarn add helpertypes
pnpm add helpertypes
bun add helpertypes
README
Logo

A collection of TypeScript helper types

Downloads per month NPM version Dependencies Contributors Support on Patreon

Description

This is a simple collection of general purpose helper types for TypeScript that can be used across a wide variety of projects.

Features

  • General-purpose
  • Small
  • Just a few types, nothing else

Backers

Bubbles Christopher Blanchard Ideal Postcodes Xerox
Bubbles
Twitter: @usebubbles
Christopher Blanchard Ideal Postcodes Xerox

Patreon

Patrons on Patreon

Table of Contents

Install

npm

$ npm install helpertypes

Yarn

$ yarn add helpertypes

pnpm

$ pnpm add helpertypes

Usage

Simply import the types you want from helpertypes:

import {ElementOf} from "helpertypes";

const FAVORITE_FOOD = ["pizza", "burger", "lasagna"] as const;

// "pizza"|"burger"|"lasagna"
type FavoriteFood = ElementOf<typeof FAVORITE_FOOD>;

Contributing

Do you want to contribute? Awesome! Please follow these recommendations.

Maintainers

Frederik Wessberg
Frederik Wessberg
Twitter: @FredWessberg
Github: @wessberg
Lead Developer

FAQ

Will this library grow over time?

Yes, but only for helper types that have common applicability. Feel free to submit a PR, and we'll take a look at it then.

License

MIT © Frederik Wessberg (@FredWessberg) (Website)

版本列表
0.0.19 2022-11-09
0.0.18 2021-11-18
0.0.17 2021-10-08
0.0.16 2021-10-08
0.0.15 2021-10-08
0.0.14 2021-10-08
0.0.13 2021-10-06
0.0.12 2021-09-15
0.0.11 2021-09-06
0.0.10 2021-09-03
0.0.9 2021-09-03
0.0.8 2021-09-02
0.0.7 2021-09-02
0.0.6 2021-09-02
0.0.5 2021-09-02
0.0.4 2021-08-22
0.0.3 2021-06-06
0.0.2 2021-05-27
0.0.1 2021-05-26