* add Intl.Locale param type to locales argument in BigInt, Number, and Date methods
* update baselines
* add test for locales object arguments
* fix indentation
`ThisParameterType<(...args: X) => void>` expands to
`(...args: X) => void extends (this: infer U, ...args: any[]) => any`.
When `X` is an unresolved type parameter it is not possible to determine
that `any[]` is assignable to `X`. However `never` is always assignable
to `X`, so we use that instead.
Same as #47643, I just missed it until looking at remaining DT failures.
I need to update the DOM-lib-generator automation, but for now I want to
get TS types corrected.
* Add missing currencyDisplay to resolved number format options
* Move declaration to es2020
* Update es2020.intl.d.ts
* Fix bad merge
Co-authored-by: Orta Therox <ortam@microsoft.com>
Co-authored-by: Orta Therox <git@orta.io>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Make Iterable Map constructor argument optional
Fixes#37779
* Change Map constructor in iterable to accept both null and undefined.
According to the spec (https://tc39.es/ecma262/#sec-map-iterable), the sole argument passed to Map is allowed to be null or undefined.
* Changed Map constructor to ensure new Map() still types as Map<any, any>.
* Add map constructor test.
This proves that the previous commit fixes#37779, as well as that new Map() still types as Map<any, any>.
* Update baseline.
Co-authored-by: Jared Neil <jaredneil@lucidchart.com>
* fix(45876): Do not specify ascii chracter order in docs for Float64Array.sort() when compareFn is omitted.
* fix(45876): Do not specify ascii chracter order in docs for any TypedArray.sort() when compareFn is omitted.
* Fix#45804
* Update src/lib/es2020.intl.d.ts
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* More fixes
* Adds a test
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any
* Use Awaited<T> with 'await'
* Clean up overloads
* Further restrict 'Awaited<T>' auto-wrapping for 'await'
* Import of Intl.Locale from #39664
* Handle updating es2020.intl and add es2021 for new DateTimeFormatOptions options - re: #39664
* Extends DateTimeFormatOptions for new Intl APIs - re: #45420
* Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping esnext.intl around)
* Adds Intl.DisplayNames to es2020 - re: #44022
* Remove attributes added in es2021 from es2020 - re: #42944
* Add a reference to es2021 in the command line parser
* Adds some docs about the lib files
* Baselines
* Allow undefined in Intl inputs to allow for ergonomic usage of exactOptionalPropertyTypes - see #45652
* Adds some tests covering the APIs
* Apply suggestions from code review
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Handle PR feedback
* More review improvements
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Mark properties defined in Annex B as deprecated
* Tweak
* Update baselines
* Update fourslash tests
* Add completionsStringMethods.ts test
* Fix sortText value in fourslash test for deprecated tags
* Update package-lock.json
* Update package-lock.json
* Mark Non-standard RegExp Constructor properties as deprecated
* Update baselines
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
like `MapConstructor`, `WeakMapConstructor` should support receiving `Iterable<readonly [K, V]>` instead of `Iterable<[K, V]>`; otherwise tuples creates with `as const`, etc. cannot be safely passed in without casts, etc.
The [String.raw spec](https://tc39.es/ecma262/#sec-string.raw) uses just
the `raw` property of its first argument, which is a useful way of using
it in user-defined tag functions to do the work of interleaving strings
and values as well as converting the values to strings.
Fixes#43609.