David Alonso
David Alonso7mo ago

Extracting the table name from the TableDefinition

I want to do something like:
export const vAllSchemaDocsUnion = v.union(
...Object.values(fireviewSchema.tables).map((table) => doc(fireviewSchema, table.name))
);
export const vAllSchemaDocsUnion = v.union(
...Object.values(fireviewSchema.tables).map((table) => doc(fireviewSchema, table.name))
);
1 Reply
ian
ian7mo ago
you'll have to iterate over Object.items since the name of the table is just in the key right now

Did you find this page helpful?