ts-reset
llm-client
ts-reset | llm-client | |
---|---|---|
20 | 7 | |
7,588 | 460 | |
0.8% | - | |
4.2 | 8.9 | |
about 2 months ago | 7 days ago | |
TypeScript | TypeScript | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ts-reset
-
Unleashing the Power of TypeScript: Improving Standard Library Types
TypeScript's standard library contains over 1,000 instances of the any type. There are many opportunities to improve the developer experience when working with strictly typed code. One solution to avoid having to fix the standard library yourself is to use the ts-reset library. It is easy to use and only needs to be imported once in your project.
-
Why doesn't TypeScript properly type Object.keys?
You might like TS Reset: https://github.com/total-typescript/ts-reset, which fixes this particular problem. I don't personally find it to be a big issue though.
Regarding runtime type checking, if you were to write something that can handle the total space of possible TS types, you would end up with incredibly complex machinery. It would be hard to make it perform, both in terms of speed and bundle size, and it would be hard to predict. I think Zod or perhaps https://arktype.io/ which target a reasonable subset are the only way to go.
-
Javascript vs typescript
https://github.com/total-typescript/ts-reset <-- this fixes the `(string | undefined)[]` issue and a few other quirks. Obviously it's annoying to need a library to fix quirks, but better than nothing.
-
Books/resources to improve TypeScript knowledge
Dude is an actual TypeScript wizard, his ts-reset package is a must have when dealing with JSON. He was featured in the VS Code day streams to show off some introductory TypeScript concepts and my big takeaway from that stream was this VS Code extension. Just stick // ^? on the line after something and it shows the type of the line above. Amazing with Prisma.
-
Typescript really hits the middle ground between extremely rigid statically typed languages on one extreme and no types at all dynamic languages on another extreme. Best type system
Personally I quite like ts-reset to "fix" some of the std lib types - JSON.parse will now return unknown. It's then up to you to decide how you wish to parse that unknown (zod, runtypes, io-ts are all reasonable options here). Won't ever be done by TS itself, as generating runtime code is a non-goal for the project.
-
Free Next.js Boilerplate for ⚡️High-Performance⚡️ Enterprise Apps
🛠️ Extremely strict TypeScript - With ts-reset library for ultimate type safety
-
How to construct this tuple type?
Ok, answered it myself: it was a perfect use case for ts-reset: https://github.com/total-typescript/ts-reset
- A 'CSS reset' for TypeScript, improving types for common JavaScript API's
llm-client
- Show HN: Open-source LLM Proxy (Node.js/TS) multi-LLM, tracing, caching, memory
- LLMClient: Open Source LLM Proxy for Logging, Debugging and Long Term Memory
- A library to use OpenAI & other LLMs in your apps. Focused on function calling and reasoning.
-
JSTools Weekly — ✨2023#8: TS-Reset: A ‘CSS reset’ For TS, Improving JS Types
minds: MindsJS - Build AI powered workflows easily
-
[P] A Prompt Engineering Library in JS works with LLMs OpenAI and Cohere.
MindJS Library https://github.com/dosco/minds
- Minds - A Typescript library to build LLM (AI) powered workflows (OpenAI & Cohere)
- [P] Minds - A JS library to build LLM powered backends and workflows (OpenAI & Cohere)
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
ts-async-kit - the easiest API to deal with promises in Typescript. Currently, ↩️ Retrying 🏃♂️ looping & 😴 sleeping
picorpc - A tiny RPC library and spec, inspired by JSON-RPC 2.0 and tRPC.
garph - Fullstack GraphQL Framework for TypeScript
Superforms - Superforms is a SvelteKit library that helps you with server-side validation and client-side display of forms.
axflow - The TypeScript framework for AI development
sonner - An opinionated toast component for React.
bling - 💍 Framework agnostic transpilation utilities for client/server RPCs, env isolation, islands, module splitting, and more.
nuxt-scheduler - Create scheduled jobs with human readable time settings