Hello,
I noticed the TS typing have been updated in the 5.3 release.
We have two areas of our code (unchanged) that are impacted by the new typings following the update.
The following items
object is part of the tbar
config:
const tbar = { items: {
layout: {
type: "combo",
items: [
['stack', 'Stack'],
['pack', 'Pack']
],
value: this.getEventLayout(),
onChange: (e: any) => this.setEventLayout(e.value)
}, ...
};
...
<BryntumSchedulerPro
project = {project}
tbar = {tbar}
...
>
}
The TS compiler returns the following error:
TS2769: No overload matches this call.
Types of property 'type' are incompatible.
Type '"combo"' is not assignable to type '"schedulingmodecombo" | undefined'.
The other error is about a property we don't use in our code: maskDefaults
.
The error is highlighted on the BryntumSchedulerPro
React component:
TS2769: No overload matches this call.
Overload 1 of 2, '(props: BryntumSchedulerProProps | Readonly<BryntumSchedulerProProps>): BryntumSchedulerPro', gave the following error.
Types of property 'maskDefaults' are incompatible.
Type 'Partial<MaskConfig> | Mask | undefined' is not assignable to type 'Partial<MaskConfig> | undefined'.
Type 'Mask' has no properties in common with type 'Partial<MaskConfig>'.
Overload 2 of 2, '(props: BryntumSchedulerProProps, context: any): BryntumSchedulerPro', gave the following error.
Types of property 'maskDefaults' are incompatible.
Type 'Partial<MaskConfig> | Mask | undefined' is not assignable to type 'Partial<MaskConfig> | undefined'.
Is there a specific version of TS that you recommend?
Was there any change that could explain why this code which compiled with 5.2.x now fails to compile with 5.3.x?
Thank you,
J