Closed
Description
Bug Report
I did not find a "planning" issue for related issues.
All delivered types should be safe to use with the new Typescript option.
🕗 Version & Regression Information
- I was unable to test this on prior versions because this is a new option
⏯ Playground Link
// @exactOptionalPropertyTypes
const IntlOptions: Intl.DateTimeFormatOptions = {
timeZone: undefined
};
🙁 Actual behavior
Type 'undefined' is not assignable to type 'string'.(2322)
🙂 Expected behavior
Should compile because undefined is a valid property for that object.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
copied from microsoft/TypeScript-DOM-lib-generator#1126