Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ECMA-402 declarations (issue #10618) #10842

Merged
merged 1 commit into from
Sep 13, 2016

Conversation

jeffreymorlan
Copy link
Contributor

Fixes #10618

  1. Make String.prototype.localeCompare's locales parameter optional, so undefined is allowed.
  2. Declare the locales parameter as a string | string[] union instead of using overloads. Having separate overloads for string and string[] unnecessarily prevents passing a string | string[]. (These overloads predate the introduction of union types.)

1. Make String.prototype.localeCompare's `locales` parameter optional,
   so `undefined` is allowed.
2. Declare the `locales` parameter as a `string | string[]` union
   instead of using overloads. Having separate overloads for `string`
   and `string[]` unnecessarily prevents passing a `string | string[]`.
   (These overloads predate the introduction of union types.)
@msftclas
Copy link

@jeffreymorlan, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@mhegazy mhegazy merged commit 5721f03 into microsoft:master Sep 13, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Sep 13, 2016

thanks!

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants