Tom RedmanT
Convex Community11mo ago
3 replies
Tom Redman

Creating a validator for [key: string]: any

Is it possible to create a Convex validator for the following type?

export type JSONContent = {
  type?: string;
  attrs?: Record<string, any>;
  content?: JSONContent[];
  marks?: {
    type: string;
    attrs?: Record<string, any>;
    [key: string]: any;
  }[];
  text?: string;
  [key: string]: any;
};
Was this page helpful?