DEV Community


Type unknown objects

ludder profile image Tom ・1 min read

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>[];
Enter fullscreen mode Exit fullscreen mode

Discussion (0)

Forem Open with the Forem app