GitShow/sindresorhus/ts-extras
sindresorhus

ts-extras

Essential utilities for TypeScript projects

by sindresorhus
Star on GitHubForknpm

TypeScript

790 stars25 forks9 contributorsActive · 3d agoSince 2021v1.2.0MIT

Meet the team

See all 9 on GitHub →
sindresorhus
sindresorhus68 contributions
younho9
younho97 contributions
jonahsnider
jonahsnider6 contributions
ifiokjr
ifiokjr3 contributions
Max10240
Max102402 contributions
carlrosell
carlrosell1 contribution
fregante
fregante1 contribution
tychenjiajun
tychenjiajun1 contribution

Languages

View on GitHub →
TypeScript100%

Commit activity

Last 12 weeks · 6 commits

Full graph →

Community health

4 of 6 standards met

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

Recent fixes

View closed PRs →
fregante
`assert*(value, message?)`ClosedIssue

Would be great to have the assertions accept an error message like native APIs do https://developer.mozilla.org/en-US/docs/Web/API/console/assert_static https://nodejs.org/api/assert.html#assertvalue-message

fregante · 3d ago
IlyaSemenov
Strongly-typed / safe Object.assignClosedIssue

I find myself repetitively using for applying object updates in-place, such as: This is purely untyped and will easy replace say a string field with a number value. (Moreover, it will gladly accept anything as the update, even a non-object). So, when I don't forget, I add a manual guard: I think a helper like this, named , will naturally go in this library alongside , , etc. Granted, it's a quite naive one-liner, but so are the other existing helpers.

IlyaSemenov · 1w ago
just-boris
Add assertNever helperClosedIssue

A typical use-case is to check exhaustiveness of a switch/case block There are so many custom copies of this utility already on Github: https://github.com/search?q=assertNever+language%3ATypeScript&type=code&l=TypeScript Seems like a reasonable addition to this library. Would you accept a PR adding it?

just-boris · 2mo ago
Structured data for AI agents

Repository: sindresorhus/ts-extras. Description: Essential utilities for TypeScript projects Stars: 790, Forks: 25. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Latest release: v1.2.0 (3d ago). Open PRs: 0, open issues: 0. Last activity: 3d ago. Community health: 71%. Top contributors: sindresorhus, younho9, jonahsnider, ifiokjr, Max10240, carlrosell, fregante, tychenjiajun, mehcode.

·@ofershap

Replace github.com with gitshow.dev