builder
builder copied to clipboard
'model' does not exist in type 'Input'
Describe the bug
When registering a component using Builder.registerComponent()
and defining the inputs, the type
model
is missing from Input
:
To Reproduce Steps to reproduce the behavior:
- Use
"@builder.io/react": "^2.0.2"
version - Create a custom component, and register using
Builder.registerComponent()
- Include something like:
inputs: [{
name: 'test',
type: 'reference',
model: 'test',
}]
and see typescript compiler highlighting it as problem "Object literal may only specify known properties, and 'model' does not exist in type 'Input'.ts(2322)"
Expected behavior
model
should work on an Input
field
Additional context
When model
is added, the visual editor restricts references to the correct model, but typescript will not allow it.