Skip to content

Commit 2bbdb31

Browse files
authored
update es2020.intl DisplayNames#of (microsoft#47157)
fix return type of Intl.DisplayNames.prototype.of was typed to return always string but can actually return undefined too see spec https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.of
1 parent f21e1a6 commit 2bbdb31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/lib/es2020.intl.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ declare namespace Intl {
299299
*
300300
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of).
301301
*/
302-
of(code: string): string;
302+
of(code: string): string | undefined;
303303
/**
304304
* Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current
305305
* [`Intl/DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object.

0 commit comments

Comments
 (0)