builder icon indicating copy to clipboard operation
builder copied to clipboard

'model' does not exist in type 'Input'

Open joelwilsonmt opened this issue 2 years ago • 0 comments

Describe the bug When registering a component using Builder.registerComponent() and defining the inputs, the type model is missing from Input: image

To Reproduce Steps to reproduce the behavior:

  1. Use "@builder.io/react": "^2.0.2" version
  2. Create a custom component, and register using Builder.registerComponent()
  3. 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.

joelwilsonmt avatar Aug 23 '22 19:08 joelwilsonmt