Skip to content

Commit

Permalink
Revert "Remove temporary namespace extension"
Browse files Browse the repository at this point in the history
This reverts commit 72d2cdc.
  • Loading branch information
bjuppa committed Aug 8, 2023
1 parent 4062b8f commit 32cfbab
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions utils/supportedCanonicalTimezones.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* Intl.supportedValuesOf is not shipped until Typescript 5.1
* Temporary workaround is from
* https://github.com/microsoft/TypeScript/issues/49231#issuecomment-1137251612
*
* TODO: When Typescript 5.1 is released with Deno (check with `deno --version`), remove this namespace extension.
*/
declare namespace Intl {
type Key =
| "calendar"
| "collation"
| "currency"
| "numberingSystem"
| "timeZone"
| "unit";

function supportedValuesOf(input: Key): string[];
}

/**
* Get all canonical timezones that are supported by the browser or runtime,
* or an empty array if the list is not available.
Expand Down

0 comments on commit 32cfbab

Please sign in to comment.