When exactOptionalPropertyTypes, TypeScript distinguishes between the
value undefined and the property not existing. See:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
For Chart.js options, this difference is not important and either
passing undefined or not including it have the same effect.
> {
type: TType;
data: ChartData<TType, TData, TLabel>;
- options?: ChartOptions<TType>;
+ options?: ChartOptions<TType> | undefined;
plugins?: Plugin<TType>[];
platform?: typeof BasePlatform;
}
TLabel = unknown
> {
data: ChartDataCustomTypesPerDataset<TType, TData, TLabel>;
- options?: ChartOptions<TType>;
+ options?: ChartOptions<TType> | undefined;
plugins?: Plugin<TType>[];
}