Type unknown objects
Tom
Posted on May 6, 2021
Sometimes I need to type an object, but I don't know how it will look like. Then I type it with the Record utility type:
export interface Label {
name: string;
options: Record<string, any>[];
}
💖 💪 🙅 🚩
Tom
Posted on May 6, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
undefined Two-Factor Authentication Using Better_Auth, Next.js, Prisma, ShadCN, and Resend
November 29, 2024