Skip to content

Commit 140fd17

Browse files
TATSUNO Yasuhirosjrd
TATSUNO Yasuhiro
authored andcommitted
Fix #384: Make locales optional in DateTimeFormat & NumberFormat. (#385)
1 parent 19fa553 commit 140fd17

File tree

1 file changed

+5
-3
lines changed
  • src/main/scala/org/scalajs/dom/experimental/intl

1 file changed

+5
-3
lines changed

src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Collator(locales: js.UndefOr[String | js.Array[String]] = js.undefined,
3535
*/
3636
@js.native
3737
@JSGlobal("Intl.DateTimeFormat")
38-
class DateTimeFormat(locales: String | js.Array[String],
38+
class DateTimeFormat(
39+
locales: js.UndefOr[String | js.Array[String]] = js.undefined,
3940
options: js.UndefOr[DateTimeFormatOptions] = js.undefined)
4041
extends js.Object {
4142
def format(date: js.Date): String = js.native
@@ -52,8 +53,9 @@ class DateTimeFormat(locales: String | js.Array[String],
5253
*/
5354
@js.native
5455
@JSGlobal("Intl.NumberFormat")
55-
class NumberFormat(locales: String | js.Array[String],
56-
options: js.UndefOr[NumberFormatOptions])
56+
class NumberFormat(
57+
locales: js.UndefOr[String | js.Array[String]] = js.undefined,
58+
options: js.UndefOr[NumberFormatOptions] = js.undefined)
5759
extends js.Object {
5860
def format(number: Double): String = js.native
5961
def resolvedOptions(): NumberFormatOptions = js.native

0 commit comments

Comments
 (0)