Dmitry Masanov
08/31/2021, 7:59 AMexport class SalesOrder extends SalesOrderBase {
@FieldType.date
custbody_deploymentdate: Date;
@FieldType.sublist(SOItemsSublist)
item: Sublist<SOItemsSublist>
}
TS shows the error:
TS2416: Property 'item' in type 'SalesOrder' is not assignable to the same property in base type 'SalesOrderBase'. Type 'Sublist<SOItemsSublist>' is not assignable to type 'Sublist<ItemSublist>'. Property 'custcol9' is missing in type 'ItemSublist' but required in type 'SOItemsSublist'.
Is there a way to handle it except for
// @ts-ignore
?Umar Naeem
08/31/2021, 12:02 PMDmitry Masanov
08/31/2021, 12:04 PMDmitry Masanov
08/31/2021, 12:04 PMDmitry Masanov
08/31/2021, 12:05 PMUmar Naeem
08/31/2021, 12:06 PMDmitry Masanov
08/31/2021, 12:17 PMitem_cust: Sublist<SOItemsSublist>
The object looks like:
{"sublistId":"item_cust"}Umar Naeem
08/31/2021, 12:19 PMDmitry Masanov
08/31/2021, 12:19 PMUmar Naeem
08/31/2021, 12:21 PMUmar Naeem
08/31/2021, 12:23 PMDmitry Masanov
08/31/2021, 12:25 PMDmitry Masanov
08/31/2021, 12:25 PMUmar Naeem
08/31/2021, 12:54 PMstalbert
08/31/2021, 1:45 PMSOItemSublist
as optional (i.e. append a ?
at the end of the property names in the class definition).Dmitry Masanov
08/31/2021, 1:46 PMstalbert
08/31/2021, 1:55 PM