Eslint and Prettier are frustrating to configure, they also run slowly learn how to setup biomejs in...
I made a library that can easily bootstrap your TypeScript library with better DX tools. It focuses...
Today I came across a tweet: https://twitter.com/BenLesh/status/1717272722193965511 I was...
type ToPaths<T, P extends string = ''> = T extends Record<number, unknown> ? { ...
In case you don't know what RighFminal typing Typescript is a structural typing language, but it is...
In the previous article, we have learned how to create custom type level error message for our...
Do you want a more descriptive error message rather than usual type A cannot assign to type B? for...
You likely heard of the term Functional Programming, that it is declarative, immutable, pure...
type ABC = { A: number, B: number } | { C: number } const abc: ABC = { A: 1, B: 2, C: 3 } // no...
(Note: Promise here refer to Promise Chain) Try to google "mix promise and await" , the first two...
This web application translates speech into Japanese speech, try it at...
download bitvise client https://www.bitvise.com/ssh-client-download -setup your login credential...
We cannot recurse tuple with more than 1000 length due to TS limitation In this example we try to...
observe the code below type A = ((v: true) => void) | ((v: false) => void) const abc: A =...
observe the below example: type A = boolean; type B = string; type C<T extends B> =...
const a = false || [] // ^? const b = [] // ^? function c() { // ^? return [] } const...
There are few reasons, the obvious reason is: optimal developer experience An intelligence type do...
This is a proof of concept post, personally I do not find any use of this, yet Typescript recursion...
type ConcatArrays< ACC extends any[][], N extends 1[] = [] > = [...ACC[N['length']],...
Before TS 4.8, obtaining value type for path A/${number} of { A: Record<number, boolean> } is...
background: type equality check Typescript power users often find themselves in the need of type...
I made a library that solves Firebase Realtime Database typing problems. It is the sister project of...
export type IsSame<T, U> = (<G>() => G extends T ? 1 : 2) extends < G >()...
type o = boolean extends Record<infer X, unknown> ? X : false // valueOf // ...
type level numeric comparator export type CreateArrayWithLengthX< LENGTH extends number, ...
Object unions of same type do not collapse type a = 1 | 1 // 1, collapsed // ^? type b = { a:1...
normally we can skip type annotation because we know that typescript will infer the type for us but...
type a = never extends `${infer P}` ? P : 1 // never // ^? type b = never extends `${infer P}/` ?...
let say you want to convert number types to undefined given arbitrary object literal type, so here is...
const a = 'a' const obj = { [a]:1 } // {a:1} const b = 'b/a' as `b/${string}` const obj2 = { [b]:1...