You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search Terms: Intl.DateTimeFormat, DateTimeFormatOptions, date format types
Code
// A *self-contained* demonstration of the problem follows...// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp,(Seebelow)
DateTimeFormatOptions interface missing specific types.
interfaceDateTimeFormatOptions{localeMatcher?: 'lookup'|'best fit';weekday?: 'long'|'short'|'narrow';era?: 'long'|'short'|'narrow';year?: 'numeric'|'2-digit';month?: 'numeric'|'2-digit'|'long'|'short'|'narrow';day?: 'numeric'|'2-digit';hour?: 'numeric'|'2-digit';minute?: 'numeric'|'2-digit';second?: 'numeric'|'2-digit';timeZoneName?: 'long'|'short';formatMatcher?: 'basic'|'best fit';hour12?: boolean;timeZone?: string;// this is more complicated than the others, not sure what I expect here}
TypeScript Version: 3.7.3
Search Terms: Intl.DateTimeFormat, DateTimeFormatOptions, date format types
Code
DateTimeFormatOptions interface missing specific types.
TypeScript/src/lib/es5.d.ts
Lines 4253 to 4267 in 408b176
Expected behavior:
I would expect the types to match what's listed here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
Actual behavior:
Playground Link:
Related Issues:
Couldn't find any