Hi, we are having Typescript compilation issues with custom fields of Model classes that we have extended.
Here is an example :
export default class CustomResourceModel extends ResourceModel {
static get fields() {
return [
{ name: 'type', type: 'number' },
{ name: 'subType', type: 'number' },
];
}
}
const model = new CustomResourceModel();
model.type = 1; // Property 'type' does not exist on type 'CustomResourceModel '.ts(2339)
How can we make the compiler know the custom fields too ?