I start to create a nuxt with slicemachine. I decided to use typescript on my project.
I'm wondering about the .json model of a slice. I have a select type with options. I will have to test these entries in my component.
My question
Is it possible to have a typescript model that builds and exports a json to allow me to create a class that reflects this json and to have an enum structure that contains my options? The objective is to reduce string duplication in tests and to have only one source of truth.
Could you give us some more details about your use case?
Where wold these typescript model and JSONs files be located in your project, and how do you imagine them being generated in Slicemachine?
Pau
closed , flag & select 'Something Else' to reopen.
6
This issue has been closed due to inactivity. Flag to reopen.
What I mean is for example I have a select name status with options :
agenda
preco
stock
To avoid creating an enum which will be a duplication of what is declare in custom_type, is there a way to match typescript enum or something to had something like