chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.9k stars 11.88k forks source link

types: Allow passing undefined for chart options #11780

Closed jdufresne closed 1 month ago

jdufresne commented 1 month ago

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.