Sign in

nyaomaru

@nyaomaru-dev.bsky.social
94 followers 235 following 194 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 · 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 · 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 · 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 · 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
030
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
030
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
050
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
040
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
030
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
020
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
030
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 · 16/08/2026
A small TypeScript pattern I use a lot 👇 Runtime check + type narrowing, without repeating the union. 😸 github.com/nyaomaru/is-... #typescript #productivity #cleancode
120
nyaomaru @nyaomaru-dev.bsky.social · 16/08/2026
Found this fun OSS project that turns your GitHub profile into a trading card 👀 It feels like a Pokémon card game, which is really fun 😸 It’d be so cool if we could build a deck with our friends’ GitHub profiles and battle each other someday 😂 github.com/mcsscalabrin... #opensource #typescript
030
nyaomaru @nyaomaru-dev.bsky.social · 15/08/2026
is-kit can now be installed with vlt ⚡️ npm and JSR packages are supported, with ESM and CJS compatibility tested against vlt v1 in CI. Let's try it! #typescript #vlt #jsr #opensource
030
nyaomaru @nyaomaru-dev.bsky.social · 14/08/2026
This is the kind of small abstraction is-kit is built for. 😸 github.com/nyaomaru/is-... #TypeScript #OpenSource
030
nyaomaru @nyaomaru-dev.bsky.social · 04/08/2026
Trapping Rain Water is tricky. I often lose track of which pointer moved, why it moved, and how much water was added at that step 😵‍💫 So I visualized `left`, `right`, `leftMax`, `rightMax`, and `water` with DSA View View 👀 Watch it here 👇 dsa-view-view.vercel.app#s=j.eyJlIjoi...
000
nyaomaru @nyaomaru-dev.bsky.social · 03/08/2026
Selection Sort is easy to describe. Find the smallest value in the remaining array, then move it to the front. But can you follow i, j, and minIndex through every comparison and swap? Let’s make the data flow visible with DSA View View 👀👀 dsa-view-view.vercel.app#s=j.eyJlIjoi...
000
nyaomaru @nyaomaru-dev.bsky.social · 02/08/2026
Bubble sort is simple. But tracing every comparison, swap, and array change in your head is harder than it looks. DSA View View makes the data flow visible, step by step. 👀👀 dsa-view-view.vercel.app#s=j.eyJlIjoi...
010
nyaomaru @nyaomaru-dev.bsky.social · 27/07/2026
Before DSA View View can visualize an algorithm, it needs to understand how to call it. So it extracts the TypeScript function or class signature from the AST, converts the parameters into field definitions, and generates a validated input. dev.to/nyaomaru/how...
000
nyaomaru @nyaomaru-dev.bsky.social · 24/07/2026
One lesson from building DSA View View. A single “Compile” button does not have to mean one giant compile function 😸 Monaco handles diagnostics, Babel handles transformation, AST analysis finds the callable signature. I wrote about how those pieces fit together here 👇 dev.to/nyaomaru/how...
000
nyaomaru @nyaomaru-dev.bsky.social · 17/07/2026
The hardest part of DSA for me isn’t understanding the final solution. It’s losing track of what changed in the middle of a loop or recursive call 😵‍💫 So I built DSA View View, a TypeScript runtime visualizer. I wrote about how and why I built it 👇 dev.to/nyaomaru/i-b...
010
nyaomaru @nyaomaru-dev.bsky.social · 14/07/2026
🎉🎉🎉 is-kit has reached 50 GitHub stars!⭐ 🎉🎉🎉 Thank you to all is-kit users! And good news, it has also been adopted in a real production project and already released 🚀🚀🚀 Thank you, again! I'll continue improving is-kit. Please try is-kit 👇 github.com/nyaomaru/is-... #typescript #oss
010
nyaomaru @nyaomaru-dev.bsky.social · 13/07/2026
Your business rules already compose. Your runtime checks should too. Built with is-kit. github.com/nyaomaru/is-...
000
nyaomaru @nyaomaru-dev.bsky.social · 12/07/2026
Validation shouldn’t become a giant if statement. Compose it with is-kit. github.com/nyaomaru/is-...
000
nyaomaru @nyaomaru-dev.bsky.social · 10/07/2026
I prefer: `result.valid` over throwing exceptions.
000
nyaomaru @nyaomaru-dev.bsky.social · 09/07/2026
Stop writing `value is string` over and over. You can use `define` with is-kit.
000
nyaomaru @nyaomaru-dev.bsky.social · 07/07/2026
Validation shouldn't become a giant if statement. Compose it with is-kit.
000
nyaomaru @nyaomaru-dev.bsky.social · 06/07/2026
`as User` changes TypeScript's opinion. It never changes the runtime value.
010
nyaomaru @nyaomaru-dev.bsky.social · 05/07/2026
Runtime validation protects your app. Type narrowing teaches TypeScript. Good type guards do both.
010
nyaomaru @nyaomaru-dev.bsky.social · 19/06/2026
TypeScript: unknown → User is only half the problem. The other half is making sure your runtime proof and existing TypeScript types never drift apart. I wrote about using typedStruct with is-kit for that 👇 dev.to/nyaomaru/the...
010
nyaomaru @nyaomaru-dev.bsky.social · 18/06/2026
I often see people comparing in TypeScript: - as - satisfies - generics (gene) But they aren't competitors. They solve different problems. I wrote about when to choose each one 👇 dev.to/nyaomaru/the...
011
nyaomaru @nyaomaru-dev.bsky.social · 10/06/2026
TypeScript: Extracting the right type from unknown sometimes feels like a tooth extraction 😵 You have to be careful. The wrong one isn't the target, OK😺
000
nyaomaru @nyaomaru-dev.bsky.social · 28/05/2026
ls ls -al
020
nyaomaru @nyaomaru-dev.bsky.social · 20/05/2026
OpenAPI codegen is great until your generated files become a forest 🌳 I compared - openapi-typescript - hey-api - Orval - Kubb using a large real-world schema, focusing on frontend DX, generated structure, error handling, and practical trade-offs. dev.to/nyaomaru/whi... #TypeScript #OpenAPI
021
nyaomaru @nyaomaru-dev.bsky.social · 18/05/2026
Recently, my brain has been exploding. 🤯
001
nyaomaru @nyaomaru-dev.bsky.social · 07/05/2026
I wrote about why I didn’t let AI fully handle my scroll animation. AI was fast and useful, but the small details still mattered: where motion stops, where it waits, where the rhythm changes, and how it feels on mobile. Built with Astro + React + TypeScript. dev.to/nyaomaru/why...
010
nyaomaru @nyaomaru-dev.bsky.social · 05/05/2026
TypeScript: Config values are usually just strings. What's this flag? github.com/nyaomaru/is-...
010
nyaomaru @nyaomaru-dev.bsky.social · 04/05/2026
In TypeScript, narrowing doesn’t have to stop at types. You can also encode constraints, such as valid ranges. For example, distinguishing a number from a valid age (18–120).
020
nyaomaru @nyaomaru-dev.bsky.social · 03/05/2026
TypeScript: you can narrow nullable too. (composable guards with is-kit)
020
nyaomaru @nyaomaru-dev.bsky.social · 02/05/2026
unknown → structured → safe This is the idea I’ve been exploring with is-kit.
020
nyaomaru @nyaomaru-dev.bsky.social · 01/05/2026
TypeScript felt safe until `any` showed up...
010
nyaomaru @nyaomaru-dev.bsky.social · 30/04/2026
Typescript unknown is the universe.
020
nyaomaru @nyaomaru-dev.bsky.social · 27/04/2026
Is your boss kind or strict? My BOSS is ...
000
nyaomaru @nyaomaru-dev.bsky.social · 26/04/2026
If you can't Run Away From Work, you must work... nyaomaru-portfolio.vercel.app/game
000
nyaomaru @nyaomaru-dev.bsky.social · 25/04/2026
tired of work? Run Away From Work! nyaomaru-portfolio.vercel.app/game
020