Create base transformer
Closed this issue · 0 comments
arthur-fontaine commented
Description
The base transformer is an abstract class that can be extended by other transformers (such as the react transformer, the vue transformer...). A transformer is what receives the data (TransformerInput
) and generates all the files from it (TransformerOutput
).
Acceptance Criteria
- export types for Input and Output
- export types for each entity
- export an abstract class TransformerBase
Tasks
- create a zod schema which is in charge to:
- create the type
TransformerInput
- create a
schema.json
file - create a function
validateTransformerInput
- create the type
- create a
TransformerOutput
type which is the return type of the abstracttransform
method - create the abstract class TransformerBase
Additional Information
What should the schema describe?
The schema describes all the entities that should support a transformer. It includes at least states, watchers, components.
Here is the minimal description of each entities:
- a state have:
- a name
- a type
- a initial value
- a watcher have:
- the state to watch
- a callback
- a component have:
- a name
- props
- have children/slot?
- a template