Sign in

nyaomaru

@nyaomaru-dev.bsky.social
92 followers 205 following 178 posts

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

PostsRepliesMedia
nyaomaru @nyaomaru-dev.bsky.social · 3h
Reusable AST guards can lose child-property narrowing. With is-kit, I compose existing ts.isX guards with a generic refineKey() helper while preserving parent + child narrowing. 🔧 dev.to/nyaomaru/typ...
dev.to
TypeScript Compiler API: Preserving Child Node Narrowing in Reusable Type Guards 🔧
Hoi hoi! 👋 I'm @nyaomaru, a frontend engineer exploring new possibilities with Jev 😸 (I'm also...
010
nyaomaru @nyaomaru-dev.bsky.social · 30/09/2026
I wrote new article! 🔧 Reusable parent + child narrowing gets awkward in the TypeScript Compiler API. I explored property refinement with `is-kit` and what changes in TypeScript 7. dev.to/nyaomaru/typ... #TypeScript #OpenSource
dev.to
TypeScript Compiler API: Preserving Child Node Narrowing in Reusable Type Guards 🔧
Hoi hoi! 👋 I'm @nyaomaru, a frontend engineer exploring new possibilities with Jev 😸 (I'm also...
020
nyaomaru @nyaomaru-dev.bsky.social · 29/09/2026
TypeScript 7 changed the Compiler API surface, but one thing surprised me: a broad `ast.Node` still isn’t a closed discriminated union. So `kind === CallExpression` doesn’t replace `isX` narrowing for that input. Full write-up tomorrow. 🔧 #TypeScript #CompilerAPI
250
nyaomaru @nyaomaru-dev.bsky.social · 29/09/2026
🎉 Changelog Bot is now live in GitBot’s in-app Library! You can now discover and use @nyaomaru/changelog-bot directly from GitBot 😸 Huge thanks to Sahil and the GitBot team for adding it! gitbot.codeongrass.com/bots/changelog-bot #OpenSource #DevTools
gitbot.codeongrass.com
Changelog Bot · GitBot Library
Previews release changelogs before updating the configured changelog.
010
nyaomaru @nyaomaru-dev.bsky.social · 28/09/2026
What does `arguments[0]` actually prove? Nothing, if the array is empty. A reusable guard for the first argument needs to prove: 1. index 0 exists 2. the value matches 3. the parent type remembers both facts Tiny runtime check, surprisingly interesting type problem. #TypeScript
030
nyaomaru @nyaomaru-dev.bsky.social · 27/09/2026
is-kit v1.15.0 is out! 🚀 A discussion about type-guard drift led to `discriminatedUnion`. It checks union coverage at compile time, so missing, extra, or mismatched branches can’t silently slip through. 👀 github.com/nyaomaru/is-... #TypeScript #OpenSource #is-kit
github.com
Release v1.15.0 · nyaomaru/is-kit
What's new 🚀 Exhaustively validate discriminated unions discriminatedUnion creates one type guard from a finite discriminated union. It requires every discriminant value in both the values tuple an...
010
nyaomaru @nyaomaru-dev.bsky.social · 27/09/2026
Optional AST children hide a different problem. `initializer?: Expression` isn’t just “another property to narrow.” A reusable guard must first prove that the property exists, then refine its value. That runtime contract deserves to be explicit. #TypeScript #OpenSource
010
nyaomaru @nyaomaru-dev.bsky.social · 26/09/2026
TypeScript 5.5 added inferred type predicates, which is great. But a compound check like: `CallExpression → expression → Identifier` can still end up as plain `boolean` when extracted. So where exactly does reusable narrowing stop being “free”? 👀 #TypeScript
020
nyaomaru @nyaomaru-dev.bsky.social · 25/09/2026
A type guard can prove both the parent and a child property at runtime. But if you extract the check into a reusable function, does TypeScript preserve both facts? `CallExpression → expression → Identifier` That small question turned into a bigger TypeScript rabbit hole. 😸 #TypeScript #WebDev
030
nyaomaru @nyaomaru-dev.bsky.social · 24/09/2026
A thought from writing this article 😸 A stale type guard can accept bad data, and the bug may appear much later far from the boundary that let it through. 👀 That distance is what makes silent drift painful. dev.to/nyaomaru/you... #TypeScript #OpenSource #OSS
dev.to
Your Type Guard Can Silently Drift from Your TypeScript Type 🔧
Hoi hoi! 👋 I'm @nyaomaru, a frontend engineer just back from a short vacation on Texel, a small...
020
nyaomaru @nyaomaru-dev.bsky.social · 23/09/2026
TypeScript article! 🔧 A handwritten type guard can stay valid while runtime checks fall behind the type. Why this drift happens, and how `typedStruct<User>()` catches it. 👀 dev.to/nyaomaru/you... #TypeScript #OpenSource
dev.to
Your Type Guard Can Silently Drift from Your TypeScript Type 🔧
Hoi hoi! 👋 I'm @nyaomaru, a frontend engineer just back from a short vacation on Texel, a small...
020
nyaomaru @nyaomaru-dev.bsky.social · 22/09/2026
This week I’ve been sharing one TypeScript maintenance problem: A hand-written type guard can keep compiling even after the type it claims to validate has changed. Tomorrow I’ll publish the full write-up — including drift, optional fields, nested types, and where `typedStruct` fits. 🔧 #TypeScript
010
nyaomaru @nyaomaru-dev.bsky.social · 21/09/2026
A small runtime-validation detail I like nickname?: string | null actually contains two separate contracts. The key may be absent. And if it exists, the value may be `null`. That’s why I prefer keeping key-level optionality and value-level nullability explicit. 👀 #TypeScript #OpenSource
040
nyaomaru @nyaomaru-dev.bsky.social · 20/09/2026
What if the existing TypeScript type could act as a compile-time contract for your runtime guard? That’s what I wanted from `typedStruct<User>()`. The runtime checks are still explicit, but missing or incompatible fields become TypeScript errors instead of silent drift. 👀 #TypeScript #OpenSource
020
nyaomaru @nyaomaru-dev.bsky.social · 19/09/2026
Yesterday I mentioned that `value is User` is a promise, not proof. Here’s the maintenance bug that follows: Add a field to `User`, forget to update the hand-written guard, and TypeScript can still compile. 👀 The type evolved. The runtime validation quietly stayed behind. #TypeScript
010
nyaomaru @nyaomaru-dev.bsky.social · 18/09/2026
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
010
nyaomaru @nyaomaru-dev.bsky.social · 17/09/2026
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... #TypeScript #JavaScript #OpenSource
020
nyaomaru @nyaomaru-dev.bsky.social · 16/09/2026
`filter(Boolean)` looks nice — until `0`, `false`, or `""` quietly disappears. 🙀 Falsy ≠ Nullish. I wrote about TypeScript narrowing, `isNotNil`, and ESLint. 😸🔧 dev.to/nyaomaru/why... #TypeScript #JavaScript #OpenSource
dev.to
Why filter(Boolean) Is Not a Nullish Filter in TypeScript 🔧
Hoi hoi! 👋 I'm @nyaomaru, a frontend engineer building small TypeScript OSS with shoyu ramen....
020
nyaomaru @nyaomaru-dev.bsky.social · 15/09/2026
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-...
dev.to
Top 7 Featured DEV Posts of the Week
Welcome to this week's Top 7, where the DEV editorial team handpicks their favorite posts from the...
110
nyaomaru @nyaomaru-dev.bsky.social · 14/09/2026
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
000
nyaomaru @nyaomaru-dev.bsky.social · 13/09/2026
I don’t think every small check needs a library. 😸 For a one-off nullish filter, an inline type predicate is perfectly fine. A named guard becomes more useful when the same meaning starts showing up repeatedly across the codebase. github.com/nyaomaru/is-... #TypeScript #OpenSource
github.com
GitHub - nyaomaru/is-kit: Build small guards. Compose them. Lightweight, zero-dependency TypeScript type guards for runtime validation and natural narrowing. Runtime-safe 🛡️, composable 🧩, and ergonom...
Build small guards. Compose them. Lightweight, zero-dependency TypeScript type guards for runtime validation and natural narrowing. Runtime-safe 🛡️, composable 🧩, and ergonomic ✨. - nyaomaru/is-kit
020
nyaomaru @nyaomaru-dev.bsky.social · 12/09/2026
There’s a TypeScript side to `filter(Boolean)` too. 👀 It removes falsy values at runtime, but `Boolean` itself isn’t a type guard. So TypeScript doesn’t generally narrow away `null` and `undefined` just because the runtime filter does. #TypeScript
010
nyaomaru @nyaomaru-dev.bsky.social · 11/09/2026
Small JavaScript reminder 👀 `filter(Boolean)` means “keep truthy values,” not “remove only null and undefined.” So valid values like `0`, `false`, and `""` disappear too. Falsy and missing are different requirements. #JavaScript #TypeScript
040
nyaomaru @nyaomaru-dev.bsky.social · 10/09/2026
One thing I noticed while learning DSA: Very different algorithms can be difficult for the same reason, too much changing state to keep in your head. 👀 🌧️ Two pointers moving 🔢 Data changing from Map → buckets 👉 A sorted area growing step by step dev.to/nyaomaru/lea... #DSA #OpenSource
dev.to
Learn Trapping Rain Water, Top K Frequent and Selection Sort with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who has been obsessed with ramen lately. 😸🍜 Have you...
010
nyaomaru @nyaomaru-dev.bsky.social · 09/09/2026
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/lea... #DSA #TypeScript #OpenSource
dev.to
Learn Trapping Rain Water, Top K Frequent and Selection Sort with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who has been obsessed with ramen lately. 😸🍜 Have you...
020
nyaomaru @nyaomaru-dev.bsky.social · 08/09/2026
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-... #TypeScript #OpenSource
github.com
Release v1.14.1 · nyaomaru/is-kit
What's Changed docs(changelog): 1.14.0 by @github-actions[bot] in #288 docs: validate hey-api types by @nyaomaru in #289 docs: clarify TypeScript 7 Compiler API compatibility by @nyaomaru in #290 ...
120
nyaomaru @nyaomaru-dev.bsky.social · 07/09/2026
I thought I’d found a TypeScript Compiler API gap. Then I reproduced it with plain objects. 👀 Turns out it’s a generic property-refinement composition problem. is-kit preserves the checked parent + child refinement for reuse without a manual return annotation. #TypeScript #OpenSource
040
nyaomaru @nyaomaru-dev.bsky.social · 06/09/2026
TypeScript inference finding 👀 Inline checks narrow correctly, but extracted predicates can fall back to `=> boolean`, losing child refinement on reuse. is-kit keeps it with `and()` + `refineKey()`. #TypeScript #OpenSource #CleanCode #TypeGuard
030
nyaomaru @nyaomaru-dev.bsky.social · 05/09/2026
TS7 AST finding 👀 Tested on TS 7.0.2 + a pinned 7.1 nightly: The shipped broad `Node` / `Expression` types still don’t narrow as discriminated unions through direct `kind` checks. is-kit keeps a reusable parent-child guard typed, without a manual parent intersection. #TypeScript #OpenSource
020
nyaomaru @nyaomaru-dev.bsky.social · 04/09/2026
Small guards are great for reusable boolean validation. Choose a schema library when you need rich errors, coercion, defaults, transforms, or code generation. is-kit.dev/guides/valid... #TypeScript #OpenSource #CleanCode
is-kit.dev
Validate unknown in TypeScript Without a Schema Library | is-kit
Validate unknown TypeScript values with small composable type guards and safeParse, without adopting a schema-first validation workflow.
120
nyaomaru @nyaomaru-dev.bsky.social · 03/09/2026
Number of Islands clicked when I stopped thinking “recursion”. Find land → paint connected land away → repeat. 🏝️👀 Visualized step by step: dev.to/nyaomaru/lea... #DSA #TypeScript #OpenSource
dev.to
Learn Number of Islands, Invert Binary Tree, and Course Schedule with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who is surprised by how cold it is in the Netherlands...
020
nyaomaru @nyaomaru-dev.bsky.social · 02/09/2026
I published another DSA View View article! 😸👀 This time: 🏝️ Number of Islands → DFS 🌳 Invert Binary Tree → Recursion 📚 Course Schedule → Topological Sorting The final code can be short, but the changing state is not always easy to follow. Let’s view it! 👀 dev.to/nyaomaru/lea... #DSA #OpenSource
dev.to
Learn Number of Islands, Invert Binary Tree, and Course Schedule with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who is surprised by how cold it is in the Netherlands...
120
nyaomaru @nyaomaru-dev.bsky.social · 01/09/2026
Treat boundary data as unknown. Validate it with composable guards, then let `safeParse` narrow the result. A type assertion performs no runtime check. is-kit.dev/guides/valid... #typescript #opensource #cleancode
is-kit.dev
Validate unknown in TypeScript Without a Schema Library | is-kit
Validate unknown TypeScript values with small composable type guards and safeParse, without adopting a schema-first validation workflow.
020
nyaomaru @nyaomaru-dev.bsky.social · 31/08/2026
is-kit v1.14.0 is out 🚀 • New refineKey, refineDefinedKey, and refineIndex helpers • Safer handling of union and broad keys • Declaration tests for TypeScript 5.7–7.0 Release notes: github.com/nyaomaru/is-... #typescript #opensource #cleancode
github.com
Release v1.14.0 · nyaomaru/is-kit
What's new 🚀 Refine nested properties with reusable type guards is-kit now provides three helpers for lifting an existing refinement onto an object property or array element: refineKey: refine a ...
020
nyaomaru @nyaomaru-dev.bsky.social · 30/08/2026
TypeScript Compiler API guards already narrow nodes. is-kit composes `ts.isX` predicates directly and carries a checked child type back to its parent—without wrappers or assertion casts. is-kit.dev/guides/types... #typescript #opensource #cleancode
is-kit.dev
Use is-kit with the TypeScript Compiler API | is-kit
Compose TypeScript Compiler API node refinements and safely narrow required, optional, indexed, and nested AST children with is-kit.
331
nyaomaru @nyaomaru-dev.bsky.social · 29/08/2026
A type predicate is a promise, not proof. Checks can drift when the TypeScript type changes. `typedStruct<T>()` turns missing or incompatible string-keyed fields into compiler errors. is-kit.dev/guides/keep-... #typescript #opensource #cleancode
is-kit.dev
Keep Type Guards in Sync with TypeScript Types | is-kit
Keep hand-written runtime guards aligned with existing string-keyed TypeScript object types using typedStruct and field-level checks.
020
nyaomaru @nyaomaru-dev.bsky.social · 28/08/2026
`filter(Boolean)` removes more than null and undefined, it also drops 0, false, and "". Use `filter(isNotNil)` when those are valid values, and keep the narrowed result type. is-kit.dev/guides/filte... #typescript #opensource #cleancode
is-kit.dev
Filter null and undefined from Arrays in TypeScript | is-kit
Safely filter null and undefined from TypeScript arrays while preserving type narrowing and valid falsy values.
010
nyaomaru @nyaomaru-dev.bsky.social · 27/08/2026
Sometimes the final answer is correct, but an unexpected runtime state still happened along the way. 👀 A stack became empty A pointer moved A recursive call returned Those tiny state changes are exactly what I want to see with DSA View View. 😸 dev.to/nyaomaru/lea... #DSA #TypeScript #OpenSource
dev.to
Learn Valid Parentheses, Reverse Linked List, and Tree Max Depth with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who struggles to make game sounds. 😿 Have you used DSA...
020
nyaomaru @nyaomaru-dev.bsky.social · 26/08/2026
Reading the code is one thing. Keeping track of a stack, moving pointers, or recursive calls in your head is another. 😿 So this time, I visualized: 🥞 Valid Parentheses 🔗 Reverse Linked List 🌳 Tree Max Depth Let's learn together! 👀👀 dev.to/nyaomaru/lea...
dev.to
Learn Valid Parentheses, Reverse Linked List, and Tree Max Depth with Step-by-Step Visualization in DSA View View 👀👀
Hoi hoi! I’m @nyaomaru, a frontend engineer who struggles to make game sounds. 😿 Have you used DSA...
000
nyaomaru @nyaomaru-dev.bsky.social · 25/08/2026
Recursive data needs a recursive guard. 🌳 `lazy` lets the guard refer to itself, then caches it. github.com/nyaomaru/is-... #typescript #opensource #cleancode #productivity
010
nyaomaru @nyaomaru-dev.bsky.social · 24/08/2026
Missing ≠ `undefined`. With is-kit: nickname: optionalKey(isString) // absent or string nickname: optionalKey(optional(isString)) // absent, string, or undefined That distinction matters at API boundaries. 😸 is-kit.dev/api-referenc... #typescript #opensource #cleancode #productivity
is-kit.dev
struct — TypeScript Object Shape Guard | is-kit
Build composable TypeScript object shape guards with required and optional keys, inferred types, and exact key checking.
020
nyaomaru @nyaomaru-dev.bsky.social · 23/08/2026
`JSON.parse()` returns `any`; `as User` only asks TypeScript to trust it. With is-kit const result = safeJsonParse(body, isUser); Invalid JSON or a guard mismatch returns `{ valid: false }`. No coercion. 😸 is-kit.dev/api-referenc... #typescript #opensource #cleancode #productivity #typesafe
is-kit.dev
safeParse and safeJsonParse — Parse Unknown Values | is-kit
Validate unknown values and decoded JSON with TypeScript type guards using safeParse, safeParseWith, and safeJsonParse.
020
nyaomaru @nyaomaru-dev.bsky.social · 23/08/2026
I need a little energy for the final push 😸✨ DSA View View is currently #13 out of 262 on Tiny Launch, and it needs 29 more upvotes to reach the top 3. If you like the project, I’d really appreciate your support! 🔗 tinylaunch.com/launch/17804...
tinylaunch.com
DSA View View: Allows you to understand DSA easily with…
Allows you to understand DSA easily with visualization. DSA View View turns TypeScript algorithm functions into step-by-step visual stories. 👀👀 Write…
000
nyaomaru @nyaomaru-dev.bsky.social · 22/08/2026
is-kit v1.13.0 is out 🚀 Known-domain refinements now preserve their final narrowing across composition. Generic `andAll` chains—including readonly tuples—work too. Also: safer predicate constraints and new guides for practical runtime validation. 😸 github.com/nyaomaru/is-kit/releases/tag/v1.13.0
github.com
Release v1.13.0 · nyaomaru/is-kit
What's new 🚀 Compose refinements while preserving their input domain and, andAll, or, and oneOf now preserve the original input domain when composing refinements. Previously, composing type predica...
000
nyaomaru @nyaomaru-dev.bsky.social · 21/08/2026
A type predicate is a promise, not a proof. `value is User` can be wrong when runtime checks drift from `User`. `typedStruct<User>()` turns missing, extra, and incompatible string-keyed fields into compile-time errors. 😸 is-kit.dev/guides/keep-... #typescript #opensource #cleancode #productivity
020
nyaomaru @nyaomaru-dev.bsky.social · 20/08/2026
When I was learning Binary Search, the code itself wasn’t the hard part. left = mid + 1; Easy. But then my brain was like Wait… which part are we searching now? 😿 That’s exactly the kind of thing I wanted DSA View View to make visible. 👀👀 dev.to/nyaomaru/is-...
dev.to
Is Learning DSA Boring? Let's Use DSA View View 👀👀 (Two Sum, Binary Search, and Bubble Sort)
Hoi hoi! I’m @nyaomaru, a frontend engineer who dislikes crowded places, so I'm planning to take a...
000
nyaomaru @nyaomaru-dev.bsky.social · 19/08/2026
New DSA View View article! 👀👀 This time: 🗺️ Two Sum 🔍 Binary Search 🫧 Bubble Sort Instead of only reading the final code, let's step through the runtime and watch the data change. Let's learn together! 😸 dev.to/nyaomaru/is-... #DSA #TypeScript #OpenSource
dev.to
Is Learning DSA Boring? Let's Use DSA View View 👀👀 (Two Sum, Binary Search, and Bubble Sort)
Hoi hoi! I’m @nyaomaru, a frontend engineer who dislikes crowded places, so I'm planning to take a...
020
nyaomaru @nyaomaru-dev.bsky.social · 18/08/2026
The is-kit docs have a new home 🚀🚀🚀 is-kit.dev Today’s guide is about validating `unknown` with small, composable guards without `as` assertions or adopting a schema-first workflow. is-kit.dev/guides/valid... #typescript #productivity #cleancode #opensource
is-kit.dev
Validate unknown in TypeScript Without a Schema Library | is-kit
Validate unknown TypeScript values with small composable type guards and safeParse, without adopting a schema-first validation workflow.
020
nyaomaru @nyaomaru-dev.bsky.social · 17/08/2026
Keep runtime guards in sync with existing TypeScript types. No `as`. Just natural narrowing. github.com/nyaomaru/is-... #typescript #productivity #cleancode
020
nyaomaru @nyaomaru-dev.bsky.social · 17/08/2026
DSA View View is launched at TinyLaunch! 🚀🚀🚀 Please check it 👇 www.tinylaunch.com/launch/17804...
tinylaunch.com
DSA View View: Allows you to understand DSA easily with…
Allows you to understand DSA easily with visualization. DSA View View turns TypeScript algorithm functions into step-by-step visual stories. 👀👀 Write…
010