-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScript
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
Metadata
Metadata
Assignees
Labels
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScript