Funny frontend engineer (React / Vue / TypeScript) Creator of is-kit is-kit.dev/en DSA View View github.com/nyaomaru/dsa-view…

The Netherlands, Heerlen
A type guard can prove two things at runtime: 1. this node is a CallExpression 2. its expression is an Identifier But once you extract that check into a reusable function, will TypeScript preserve both facts? That question sent me down a rabbit hole. 😸 #TypeScript #WebDev
1
280
A stale type guard can fail in two ways: ❌ Reject valid data → loud bug ⚠️ Accept invalid data → silent bug The second one is scarier because the failure happens much later, far from the real cause. That’s the drift I wrote about here: dev.to/nyaomaru/your-type-gu… #TypeScript
2
359
New article! 🔧 A TypeScript type guard can keep compiling after its runtime checks drift from the type. value is User is a promise, not proof. Here’s how typedStruct<User>() catches that drift at compile time. 👀 dev.to/nyaomaru/your-type-gu… #TypeScript #OpenSource
1
374
A hand-written type guard can be perfectly valid TypeScript and still be stale at runtime. That’s the problem I’ve been exploring this week. Tomorrow I’ll publish the full write-up on keeping runtime guards in sync with existing TypeScript types. 🔧 #TypeScript #OpenSource
1
411
nyaomaru retweeted
We’ve added is-kit project by @nyaomaru_dev to the EmbedCatalog. About: Build small guards. Compose them. Lightweight, zero-dependency TypeScript type guards for runtime validation and natural narrowing. Link in the comments.
2
1
3
274
Optional and nullable are two different contracts. 👀 nickname?: string | null means: - the key may be missing - if present, the value may be `null` Those are separate runtime decisions too. `optionalKey(nullable(isString))` #TypeScript
1
416
What if TypeScript could catch that type-guard drift for you? With `typedStruct<User>()`, the existing type becomes a compile-time contract for the guard definition. Missing field? Error. Wrong guard? Error. Runtime checks stay explicit. 👀 #TypeScript #OpenSource
1
1
422
Yesterday: a type predicate is a promise, not proof. Here’s where that becomes dangerous 👀 Add a new field to `User`, forget to update `isUser` and TypeScript can still compile. The type changed. The runtime guard didn’t. #TypeScript #JavaScript
1
4
449
TypeScript type guard finding 👀 A return type like: `value is User` is a promise made by the function. not proof that the runtime implementation actually checks every field. That gap can quietly become a maintenance problem. #TypeScript #JavaScript
1
415
There’s a TypeScript side to `filter(Boolean)` too. It removes falsy values at runtime, but `Boolean` isn’t a type guard. So TypeScript doesn’t generally know that `null` and `undefined` are gone. More in my latest article 👇 dev.to/nyaomaru/why-filterbo… #TypeScript #JavaScript
396
New article! 😸 filter(Boolean) is convenient, but it’s not a nullish filter. Valid values like 0, false, and "" can disappear too. Falsy ≠ Nullish. dev.to/nyaomaru/why-filterbo… #TypeScript #JavaScript #OpenSource
2
3
406
My post was featured in DEV Community’s Top 7 Posts of the Week! 😸🎉 Really happy to see it picked up by the DEV team. Thanks to everyone who read, reacted, and commented! ❤️‍🔥 dev.to/devteam/top-7-feature…
401
Tiny JavaScript edge case 👀 `value != null` is often used as a short nullish check. But `document.all` is a historical browser exception: it behaves as nullish under loose equality. JavaScript is fun. 😹 #JavaScript #WebDev
1
435
There’s a TypeScript difference too 👀 `filter(Boolean)` removes falsy values at runtime, but `Boolean` isn’t a type guard. So TypeScript doesn’t generally know that `null` and `undefined` are gone. #TypeScript #JavaScript
1
459
Small JavaScript reminder 👀 `filter(Boolean)` doesn’t mean “remove null and undefined.” It means “keep only truthy values.” So `0`, `false`, and `""` disappear too. Falsy and missing are different requirements. #JavaScript #TypeScript
1
407
The code itself is often not the hardest part of DSA. It’s keeping track of what changes while it runs. 👀 - `left` moved. -`water` increased. -A bucket changed. That’s what I want to see with DSA View View. 😸 dev.to/nyaomaru/learn-trappi… #DSA #TypeScript #OpenSource
1
411
New DSA View View article! 👀👀 🌧️ Trapping Rain Water → Two Pointers 🔢 Top K Frequent → Buckets 👉 Selection Sort → Selection Watch the runtime state change step by step. 😸 dev.to/nyaomaru/learn-trappi… #DSA #TypeScript #OpenSource
393
is-kit v1.14.1 is out 😸 This release fixes two non-obvious runtime paths • preserves strict nullish semantics in browsers, including the document.all edge case • removes exception-driven checks from the successful isTypedArray path github.com/nyaomaru/is-kit/r… #OpenSource
3
403
Thought I’d found a TypeScript Compiler API gap. Then I reproduced it with plain objects. 👀 So it’s not AST-specific, it’s a generic property-refinement composition problem. is-kit keeps the parent + child refinement reusable without a manual return. #TypeScript #OpenSource
404