add types for escape and unescape methods #18813 (#19015)

* add types for escape and unescape methods #18813
although the issue is marked working as expected, it is important to mention that most major browsers maintain support for escape and unescape, and some javascript codebases moving to typescript may have escape and unescape in them. They are valid JavaScript, and thus they should be included in the global definition.

* add escape and unescape types to lib in tests

* update tests to turn CI green
This commit is contained in:
Wilson Hobbs 2017-11-13 13:37:54 -05:00 committed by Mohamed Hegazy
parent e7df83263d
commit c2f0c580db
5 changed files with 847 additions and 823 deletions

12
src/lib/es5.d.ts vendored
View File

@ -62,6 +62,18 @@ declare function encodeURI(uri: string): string;
*/
declare function encodeURIComponent(uriComponent: string): string;
/**
* Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
* @param string A string value
*/
declare function escape(string: string): string;
/**
* Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
* @param string A string value
*/
declare function unescape(string: string): string;
interface PropertyDescriptor {
configurable?: boolean;
enumerable?: boolean;

View File

@ -6,5 +6,5 @@
////var f = function () { return new/**/; }
goTo.marker();
verify.completionListCount(115);
verify.completionListCount(117);
verify.completionListContains('new');

View File

@ -5,6 +5,6 @@
////var f = function (s) { return this/**/; }
goTo.marker();
verify.completionListCount(116);
verify.completionListCount(118);
verify.completionListContains('this');

View File

@ -4,4 +4,4 @@
//// var x = </**/;
goTo.marker();
verify.completionListCount(42);
verify.completionListCount(44);

1652
tests/lib/lib.d.ts vendored

File diff suppressed because it is too large Load Diff