Sasha 🐏💨 Koss
koss.nocorp.me
Sasha 🐏💨 Koss
@koss.nocorp.me
I make rad things. Many are open-sourced, like date-fns. Some, like https://mindcontrol.studio are not.
Much cleaner! ✨
October 17, 2025 at 4:39 AM
I added two more functions, `todo` and `ensure` (that assert non-nullish, unlike `always` that asserts truthiness).

Also, I covered it with tests and detailed JSDocs.

Who would've thought that one could push such a simple code that far!
October 14, 2025 at 4:41 AM
Here's an example of when it's handy.
October 10, 2025 at 6:31 AM
I just published the stupidest npm package, `alwaysly`. There's nothing to it but two one-liner functions.

I use them often and am too lazy to drag them around.

Btw, if you don't use this pattern in your TypeScript code, you're missing out!
October 10, 2025 at 6:31 AM
If left unchecked, agents eventually end up hook-locking themselves and unable to progress.

I got this effects spaghetti after just a few (spec-driven!) sessions. It is simply deciding whether to show a key form, form with an error, or a masked key view.
October 6, 2025 at 2:14 AM
In other news, a heavy Singapore rain drenched my monitor (and PC a bit), so I had to disassemble it to dry it 😭
August 18, 2025 at 5:47 AM
📊 Benchmark results:
August 18, 2025 at 5:28 AM
I just published [email protected] that serializes JS values into a stable string representation.

Happy to say it's 30% faster than alternatives, and it's just 185B!

I built it to use with my other library, smolxxh (just 381B), to get JS value hashes.
August 18, 2025 at 5:28 AM
I just got to my highest rating in rapid chess—1576 😅 It's modest, but I'm proud either way.
August 14, 2025 at 9:10 AM
People are sleeping on git submodules.

I used them for private projects for years and recently adopted them for date-fns.

With pnpm workspace, I can work on multiple packages in a single project while having GitHub issues and actions separated.
August 13, 2025 at 2:32 AM
@date-fns/tz is now at ~9M monthly downloads 🧐

I'm glad people find it useful!
August 12, 2025 at 12:19 PM
Anthropic's answer to GPT-5 is brutal!
August 8, 2025 at 6:38 AM
If you're into chess, you'll love En Croissant: github.com/franciscoBSa...

It's a well-made cross-platform app (à la ChessBase) w/ support for multiple engines, a nice UI, and many more features useful when studying.

Consider supporting the creator at: buymeacoffee.com/franciscosal
August 8, 2025 at 2:16 AM
ADRs (Architecture Decision Records) are immensely beneficial but also tedious to write when following the recommended templates. So I found myself avoiding writing them.

Now start with just bullet points to capture the essence.

Perfect is the enemy of good.
July 27, 2025 at 9:22 PM
So glad to see these options enabled in the new TypeScript default config 👌
July 25, 2025 at 10:10 PM
It is improving, and I think I can completely get rid of ts-expect-errors and make my tests clean ✨

Look like naive `satisifes` expressions fail most of the times.
July 25, 2025 at 3:56 AM
Isn't this rad?

If you don't write complex TypeScript types, it's a test framework that checks generic results.
July 25, 2025 at 2:41 AM
I'm working on dissecting TypeScript type system to breakdown all the magic that powers the most complex generics.

Here's the assign compatibility matrix of all basic types.
July 24, 2025 at 12:08 AM
And no, you can not reproduce it by adding all primitives, object and void. {} is the key 👆

www.typescriptlang.org/play/#code/C...
July 23, 2025 at 2:55 PM
Did you know about the everything type in TypeScript?

type Everything = {} | null | undefined;

It behaves not like you would expect, and you can assign anything to it, even unknown, that can only be assigned to any and itself.
July 23, 2025 at 6:03 AM
It is mind-blowing that this tiny board runs Linux
July 2, 2025 at 2:30 AM
🤯 You can merge namespace declarations in TS!
June 29, 2025 at 1:50 AM
I have my own typed versions of `useMemo` and `useCallback`, so that I can check if I didn't accidentally pass an unstable reference as an argument (where it matters).

It would be great to have typed `useEffect` dependencies too.

I think it must be in React types btw!
June 26, 2025 at 10:06 PM
For the first time, used the TS interface merging feature and I think I'm so clever 😎
June 26, 2025 at 10:01 PM
Is `import Self = BlueprintPromptController;` a cursed hack or a genius idea? 🤔

I love it, personally, and proud that I discovered it.
June 19, 2025 at 10:56 PM