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

Update lib.d.ts: Change the type of uriComponent (passed to encodeURIComponent) from string to string | number | boolean #31103

Merged
merged 1 commit into from Apr 26, 2019

Commits on Apr 26, 2019

  1. Change the type of 'uriComponent' (passed to 'encodeURIComponent') fr…

    …om 'string' to 'string | number | boolean'. Fixes #18159
    
    - According to the ECMAScript 5.1 spec (§15.1.3.4), 'encodeURIComponent' invokes the abstract operation 'ToString': https://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4
    - In the spec (§9.8), 'ToString' accepts an 'Undefined', 'Null', 'Boolean', 'Number', 'String' or 'Object' argument: https://www.ecma-international.org/ecma-262/5.1/#sec-9.8
    - TypeScript’s 'StringConstructor' accepts an argument with type 'any': https://github.com/Microsoft/TypeScript/blob/b0100100a18d740ad0b7c626bc81b800b5273ece/lib/lib.es5.d.ts#L518
    smockle committed Apr 26, 2019
    Copy the full SHA
    2abcb5f View commit details
    Browse the repository at this point in the history