hourCycle option not recognized for Date.toLocaleString #34399
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Milestone
TypeScript fails to recognize the
hourCycle
parameter for toLocaleString, documented on MDN.TypeScript Version:
3.7.0-dev.20191014
Search Terms:
toLocaleString
,hourCycle
Code:
TS2345
Expected behavior:
Compiles without error
Actual behavior:
The generated code then runs fine under Node 12 (I think it's not supported below this version) and in browsers and prints the expected output of the date with requested hour cycle.
Playground Link: http://www.typescriptlang.org/play/?ts=Nightly&ssl=1&ssc=50&pln=1&pc=70#code/MYewdgzgLgBAhjAvDAFGApgdxgETldFASiIDooQAZEYOAG3QGUoAnASzAHMUBXMAE3QAzDun4AaGAG8YACxA8WAYQCewBgC4YAclkBGAEzaYAXyIBuIA
Related Issues:
I did not find any.
The text was updated successfully, but these errors were encountered: