Sasha πŸπŸ’¨ Koss's Avatar

Sasha πŸπŸ’¨ Koss

@koss.nocorp.me

I make rad things. Many are open-sourced, like date-fns. Some, like https://mindcontrol.studio are not.

473 Followers  |  301 Following  |  154 Posts  |  Joined: 24.05.2023  |  1.9243

Latest posts by koss.nocorp.me on Bluesky

How deno_doc is that good? --json outputs data structure I always needed to render date-fns docs.

I wish I had discovered it earlier. I dread migrating the documentation website once again, but I feel it would be worth it!

11.08.2025 09:14 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I used ChessBase just a bit so it's hard for me to compare, but even Lichess Study UI is a bit nicer when it comes to annotating lines. It's good to have an open-source alternative though. I hope the author/community finds the energy to evolve it and eventually add missing features and improve UX πŸ™

08.08.2025 06:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Anthropic's answer to GPT-5 is brutal!

08.08.2025 06:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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

08.08.2025 02:16 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Post image

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.

27.07.2025 21:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

So glad to see these options enabled in the new TypeScript default config πŸ‘Œ

25.07.2025 22:10 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

25.07.2025 03:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Isn't this rad?

If you don't write complex TypeScript types, it's a test framework that checks generic results.

25.07.2025 02:41 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

Here's the link to the WIP doc: github.com/kossnocorp/g...

And the tysts file I use to build it: github.com/kossnocorp/g...

24.07.2025 00:07 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

24.07.2025 00:07 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

And no, you can not reproduce it by adding all primitives, object and void. {} is the key πŸ‘†

www.typescriptlang.org/play/#code/C...

23.07.2025 14:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

The reason it works this way is very fascinating!

{} is a non-nullable type and includes everything but null | undefined, so with null | undefined it mirrors unknown behavior.

So that unknown could have been expressed as:

type unknown = {} | null | undefined

23.07.2025 14:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
TS Playground - An online editor for exploring TypeScript and JavaScript The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.

Playground link: www.typescriptlang.org/play/#code/C...

23.07.2025 06:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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.

23.07.2025 06:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 2

And you're lucky if you have an extensive tyst suite and can catch broken types early. It's pure hell without it.

21.07.2025 02:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Writing advanced TypeScript generics turns into a whack-a-mole game at some point.

While I appreciate the power the type system gives me and it's wonderful what one can do with it, but I really don't enjoy how brittle it can be.

21.07.2025 02:20 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1
Preview
Strict function types by ahejlsberg Β· Pull Request #18654 Β· microsoft/TypeScript With this PR we introduce a --strictFunctionTypes mode in which function type parameter positions are checked contravariantly instead of bivariantly. The stricter checking applies to all function t...

I love how @typescriptlang.org issues are often are the documentation when it comes to behavior nuances.

For example, I found out that method params are checked bivariantly while function params are checked contravariantly and the explanation why is so is there: github.com/microsoft/Ty...

04.07.2025 22:21 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I just spent 5 hours straight debugging a Rust-based @Cloudflare worker panicking, and it all lead me to workers-rs using unwrap and causing a trivial deserialization error show as "Worker exceeded CPU limit."

True clusterfuck 🫠

The culprit: github.com/cloudflare/w...

02.07.2025 08:10 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

It is mind-blowing that this tiny board runs Linux

02.07.2025 02:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

🀯 You can merge namespace declarations in TS!

29.06.2025 01:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I didn't realize how off my world physics intuition until I tried to internalize how electrical resistance works.

29.06.2025 01:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

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!

26.06.2025 22:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

For the first time, used the TS interface merging feature and I think I'm so clever 😎

26.06.2025 22:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Nix and NixOS are great and sound great, but not for everyone. Not for me, certainly.

I like learning but, not when I have to do it, to make any progress.

23.06.2025 23:43 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

After six months using NixOS for reproducible development environments, I'm giving up. The last drop was trying to make it work with embedded development (ESP32, Rust, WSL2).

Switched to Dev Containers and couldn't be happier.

23.06.2025 23:43 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Update: It doesn't work for runtime due to `ReferenceError: Self is not defined`.

Still good for types, though.

19.06.2025 23:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Is `import Self = BlueprintPromptController;` a cursed hack or a genius idea? πŸ€”

I love it, personally, and proud that I discovered it.

19.06.2025 22:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

I'm considering moving from the pattern of defining `ComponentNameProps` to using namespaces `ComponentName.Props`.

1) Name pool is smaller.
2) I can add more component types when needed.
3) Single import vs. multiple.

Y'all hate namespaces, tell me why it's a bad idea.

19.06.2025 22:20 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

TIL there's very handy "TypeScript: Find File References" VS Code command

17.06.2025 21:13 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It is still funny that removing fishing/scum tweets is the main Twitter Premium feature.

12.06.2025 22:59 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@koss.nocorp.me is following 20 prominent accounts