GitShow/sindresorhus/type-fest
sindresorhus

type-fest

A collection of essential TypeScript types

by sindresorhus
npm-packagetypestypescripttypescript-definitionsutilities
Star on GitHubForknpm

TypeScript

17.3k stars722 forks214 contributorsActive · 14h agoSince 2019v5.8.0CC0-1.0

Meet the team

See all 214 on GitHub →
sindresorhus
sindresorhus367 contributions
som-sm
som-sm134 contributions
Emiyaaaaa
Emiyaaaaa61 contributions
skarab42
skarab4221 contributions
voxpelli
voxpelli12 contributions
trevorade
trevorade12 contributions
privatenumber
privatenumber10 contributions
kainiedziela
kainiedziela9 contributions

Languages

View on GitHub →
TypeScript84.4%
JavaScript15.6%

Commit activity

Last 12 weeks · 30 commits

Full graph →

Community health

5 of 6 standards met

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

Recent PRs & issues

Active · Last activity 14h ago
See all on GitHub →
MahinAnowar
`Writable`: Only strip `readonly` without altering the structureOpenPR

Fixes #717. Problem When is used without the optional argument, it doesn't only strip — it also changes the object's structure. The clearest symptom is an index signature: currently resolves to — a spurious numeric index signature gets added. This happens because the default (all-keys) case still goes through the rebuild, and that / round-trip does not faithfully reproduce the original shape. Fix As suggested in the issue thread ("add an overload when that parameter is not passed and use the simple handling"), the default case now uses a plain homomorphic mapped type: This only removes the modifier and otherwise preserves the input structure exactly, including index signatures — matching the simpler community implementations referenced in the issue. The explicit subset-of- path () is left completely unchanged, so all existing behavior and tests are preserved. The all-keys case is detected with (already used internally by ), which is both when is omitted and when the full key set is passed explicitly — semantically identical intents. Tests Added two assertions to : → → Both fail on the current code (the result carries the extra index signature) and pass with the fix. Verified with on the source change. The full ( + + + linter) passes.

MahinAnowar · 1h ago
momomuchu
Fix Get<T, Paths<T>> for generic TOpenPR

fails to compile for a generic (#991). can include bare numeric-literal keys (e.g. alongside ), which for an unresolved generic TypeScript treats structurally as . 's parameter was constrained to string only, so it rejected the and the whole expression failed to typecheck. This widens 's constraint to also accept and normalizes the path through before splitting, so a bare-number path resolves the same as its string form. Added a case for with a generic . It fails to compile without the fix and passes with it. , , and all green. Closes #991

momomuchu · 12h ago
som-sm
`IsLiteral*`: Fix behavior with unionsOpenPR

This PR primarily fixes the behavior of types when instantiated with a union of literals and non-literals. For example, currently returns , instead it should return . This PR also makes a couple of other things: Replaces certain complicated/contrived JSDoc examples with simpler ones. Removes unclear use-cases section from JSDoc. IMO, the use-cases mentioned were not adding much value. Separates the different literal types into individual files. Rewrites both the implementation and tests for all literal types from scratch. Fixes behavior with / types. Also, the input to these literal types is currently unconstrained, but I think that should be constrained. For example, instead of _just_ .

som-sm · 1d ago

Recent fixes

View closed PRs →
liu-idf18
gh pr checkout 1481 - Atualização MergedPR

TZAHAL 165

liu-idf18 · 1d ago
liu-idf18
gh pr checkout 1480 -Atualização MergedPR

TZAHAL

liu-idf18 · 1d ago
liu-idf18
gh pr checkout 1479 - RevertsMergedPR

Reverts sindresorhus/type-fest#1459 TZAHAL 165

liu-idf18 · 1d ago
Structured data for AI agents

Repository: sindresorhus/type-fest. Description: A collection of essential TypeScript types Stars: 17274, Forks: 722. Primary language: TypeScript. Languages: TypeScript (84.4%), JavaScript (15.6%). License: CC0-1.0. Topics: npm-package, types, typescript, typescript-definitions, utilities. Latest release: v5.8.0 (13h ago). Open PRs: 43, open issues: 185. Last activity: 14h ago. Community health: 100%. Top contributors: sindresorhus, som-sm, Emiyaaaaa, skarab42, voxpelli, trevorade, privatenumber, kainiedziela, tommy-mitchell, taiyakihitotsu and others.

·@ofershap

Replace github.com with gitshow.dev