Skip to content

Instantly share code, notes, and snippets.

interface User {
id: number
name: string
}
type Repository<T> = {
// `TKey in string & keyof T`: Enumerate all keys of the given object as string
// `findBy${Capitalize<TKey>}`: infer all keys by a template string
[TKey in string & keyof T as `findBy${Capitalize<TKey>}`]: (args: T[TKey]) => T[] // May be a promise
}
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 3, 2025 20:10
Conventional Commits Cheatsheet