
Dennis Kinuthia
FullStack Web Developer
I create fast, accessible, and modern web applications with TypeScript, React, and Next.js. Based in Nairobi, Kenya, I'm passionate about developer experience and building elegant solutions to complex problems.
Certificate verification: Scan the QR code or visit
this linkMy Projects
moggin
last updated
a productivity tracking app with an android homescreen widget with jetpack compose glance
- expo
- jetpack-compose
- react-native
frens
last updated
GraphQL modern, type-safe stack with Pothos and Prisma for the main API + better auth for the auth(z) , and frontend with react and the relay client
- expressjs
- graphql
- prisma
- react
fl
i
Private project
last updated
tigawanna
last updated
more about dennis kinuthia
- portfolio
- nextjs
- tailwind
- nodemailer
fl
m
Private project
last updated
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
Adding Typings for JSON parse
Technique for making JSON parse emit the input object type instead of any
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>;
}