Languages Stats on Github
- TypeScript23%
- JavaScript23%
- CSS20%
- HTML12%
- Shell3%
- Python3%
- C2%
- EJS1%
Currently working on


Re
s
Private project
last updated
2 hours ago
fl
i
Private project
last updated
3 hours ago
fl
m
Private project
last updated
5 hours ago
vite-plugin-graphql-usage
last updated
12 hours ago
A Vite plugin for analyzing GraphQL usage
- graphql
- npm
- vite
bidii
last updated
4 days ago
grind tracking app for developers
- expo
- github-api
- react
- react-native
My Latest Articles
vite-plugin-graphql-usage
🚀 Spent 5 hours automating a 5-minute task... and I regret nothing! At work, I kept finding myself...
read morePublished at:
5/26/2025Understanding Discriminated Unions in TypeScript
Discriminated unions (also known as tagged unions) are a powerful TypeScript pattern that enables...
read morePublished at:
4/25/2025Revisiting GraphQL in 2025: A Type-Safe Stack with Pothos and Relay
This article explores building a GraphQL server in 2025 using a modern, type-safe stack. We'll cover...
read morePublished at:
4/15/2025How to get the Oauth providre access tokens from next auth/authjs
Modify your nextauth client and add a callbacks section that will get the access token from the...
read morePublished at:
2/20/2025
Cool thing i recently learnedsee more
Adding Typings for JSON parse
Technique for making JSON parse emit the input object type instead of any
January 27, 2025
const obj = {
a: 'hello',
b: 1,
c: undefined,
d: {
toJSON() {
return 42;
}
},
e: () => console.log('hi from e')
}
const str = JSON.stringify(obj);//?
// ^?
const parsed = JSON.parse(str);
// ^?
writePersonObject('');
function writePersonObject(str: Stringified<{firstname: string, lastname: string}>) {
}
type JsonifiedValue<T> = T extends string | number | null | boolean
? T
: T extends {toJSON(): infer R} ? R
: T extends undefined | ((...args: any[]) => any) ? never
: T extends object ? JsonifiedObject<T>
: never;
type JsonifiedObject<T> = {
[Key in keyof T as [JsonifiedValue<T[Key]>] extends [never] ? never : Key]: JsonifiedValue<T[Key]>
}
parsed.b
type Stringified<ObjType> = string & {source: ObjType};
interface JSON {
stringify<T>(value: T, replacer?: null | undefined, space?: string | number): Stringified<T>;
parse<T>(str: Stringified<T>, replacer?: null | undefined): JsonifiedObject<T>;
}