Generate Typescript types from schema #1872
Answered
by
josephschorr
karlismelderis-mckinsey
asked this question in
Q&A
-
Has anyone attempted to generate TypeScript types from Spice schema?
would produce: const acmeSystemRelations = {
ADMIN: admin
SUPPORT: support
} as const
type AcmeSystemRelations = typeof acmeSystemRelations[keyof typeof acmeSystemRelations]
const acmeSystemPermissions = {
ROOT_ACCESS: 'root_access',
SUPPORT_ACCESS: 'support_access',
CREATE_SOMETHING: 'create_something',
} as const
type AcmeSystemPermissions = typeof acmeSystemPermissions[keyof typeof acmeSystemPermissions] |
Beta Was this translation helpful? Give feedback.
Answered by
josephschorr
Apr 19, 2024
Replies: 1 comment 2 replies
-
We actually have a prototype of a well-generated client for TypeScript, but we're still unsure of the best means of generating the TypeScript code necessary |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
vroldanbet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We actually have a prototype of a well-generated client for TypeScript, but we're still unsure of the best means of generating the TypeScript code necessary