Skip to content

Commit

Permalink
types: declare manifest types
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Oct 31, 2024
1 parent c6571cb commit 79b4e77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ export const manifestTemplate = (collections: ResolvedCollection[], manifest: Ma
}, {} as Record<string, unknown>)

return [
`export const checksums = ${JSON.stringify(manifest.checksum, null, 2)}`,
`export const checksums: Record<string, string> = ${JSON.stringify(manifest.checksum, null, 2)}`,
'',
`export const tables = ${JSON.stringify(
`export const tables: Record<string, string> = ${JSON.stringify(
Object.fromEntries(collections.map(c => [c.name, c.tableName])),
null,
2,
)}`,
'',
'export default ' + JSON.stringify(collectionsMeta, null, 2),
Expand Down

0 comments on commit 79b4e77

Please # to comment.