is-kit Reached 100 Stars – What Changed Since 50
Description and use
is-kit reached 100 stars: new property refinement APIs, an exhaustive discriminated union validator, stricter semantics, and broader environment support were added. The library is now used in other OSS projects and helped expose a type inference bug in Effect TS.
Problem
Developers need reusable runtime type guards that integrate smoothly with TypeScript control flow and can be composed across projects.
Outcome
The library evolved to support property refinement, exhaustive discriminated unions, stricter semantics, and broader environment compatibility. It is now adopted in multiple OSS projects and helped uncover a subtle TypeScript inference bug in Effect TS.
Workflow
- 1. Identify a need for property‑level refinement of existing type guards.
- 2. Implement
refineKey,refineDefinedKey, andrefineIndexto lift a guard onto a property or array index. - 3. Add
discriminatedUnionto generate exhaustive validators for union types, checking for missing or extra branches. - 4. Tighten existing APIs (e.g.,
recordOf,struct) for stricter runtime checks and better error handling. - 5. Expand test coverage to ESM, CommonJS, Deno, and JSR environments.
- 6. Integrate is-kit into other OSS projects (e.g., changelog-bot) using
definefor reusable predicates. - 7. Resolve a real‑world bug where is-kit’s
unknownrefinement caused type inference issues in Effect TS, leading to a PR that introducedNoInfer. - 8. Document changes and share lessons learned in a blog post.
Evidence
"The library gained new APIs, some existing APIs became stricter, I started using it in more of my own OSS projects, and one real‑world use case even exposed a type inference edge case in Effect."
"is-kit added three property refinement helpers: refineKey, refineDefinedKey, refineIndex."
"The biggest addition since the 50-star article is probably the exhaustive discriminated union API introduced in v1.15.0."
"Recent releases included fixes around: recordOf literal-key narrowing, native Error brand checks, array guards with overridden iterators, exact struct validation, symbol-keyed struct schemas, cross-realm struct schemas."
"I started using is-kit more naturally in other OSS projects I maintain. For example, in my changelog tooling of changelog-bot, I use define to keep small predicates reusable and composable."
"An is-kit guard ran into an Effect type bug. The refinement could affect generic inference in an unexpected way. The reported case resulted in this Effect PR."
- Record date: 2026-10-25T12:26:25.423Z