DEV Community

Tom
Tom

Posted on

1 1

Type unknown objects

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

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more