sindresorhus

type-fest

A collection of essential TypeScript types

by sindresorhus

TypeScript

TypeScript91.3%
JavaScript8.7%

Commit activity

Last 12 weeks · 182 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
100
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template
emmnull

Type description + examples With typescript now supporting predicate inference for guard functions without the need for explicitly specifying a clause, it could be interesting to provide a simple helper that allows to get the inferred predicate for any guard function. Ex.: Type source Search existing types and issues first [X] I tried my best to look for it

emmnull · 9h ago
JQuezada0

Type description + examples Super simple type, it takes one generic and returns a union of it or a function that returns it. No real opinion on the naming, just not sure what else to call it. When authoring a custom plugin for various build tools (ex. vite), the plugin lifecycle callback functions are typically allowed to be sync or async. If a plugin author wanted to extend that to the plugin consumers via the plugin's input options, that would allow the plugin consumer to delay certain operations until the plugin actually needs it. Ex. If there's an input that would require the caller to import from another module, and using ESM they could prefer a dynamic import which would only be executed when the plugin calls the thunk. otoh, a different consumer might want to pass a static value. Type source Search existing types and issues first [X] I tried my best to look for it

JQuezada0 · 1d ago
innermatrix
IsBivariantClosedIssue

Type description + examples Most of the time when I want to test for equality, I actually care about mutual assignability (aka bivariance), not exact equality. https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbwJIGcCiBHArgQwDYA0cAggHYAmAvnAGZQQhwDkMAnmAKYC0NHKMTAFCC2nOKgBCwAG44owHKRgAeACoBGIqoBMAPjgBeEhTXq4HAB4wOFFHB1wA-HBhQsHOAC5a+FBy3a5lY25HYaTi5uHt40vhy6ANzCoh7hRghwANbe-PKkAOZwlCLsqYHpWTmuwAVFJWKqAMyG9mYAPvbayaUufDBmRqiYuHimWo2JcAD0Uz54fvUe1vzl4ihSsvKKKhrjkzOR7sJAA Type source _No response_ Search existing types and issues first [X] I tried my best to look for it

innermatrix · 1d ago
Structured data for AI agents

Repository: sindresorhus/type-fest. Description: A collection of essential TypeScript types Stars: 17459, Forks: 744. Primary language: TypeScript. Languages: TypeScript (91.3%), JavaScript (8.7%). License: CC0-1.0. Topics: npm-package, types, typescript, typescript-definitions, utilities. Latest release: v5.10.0 (1mo ago). Open PRs: 0, open issues: 64. Last activity: 9h ago. Community health: 100%. Top contributors: sindresorhus, som-sm, Emiyaaaaa, skarab42, voxpelli, trevorade, taiyakihitotsu, benzaria, kainiedziela, tommy-mitchell and others.