Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c2f0c58

Browse filesBrowse files
wbhobmhegazy
authored andcommitted
add types for escape and unescape methods microsoft#18813 (microsoft#19015)
* add types for escape and unescape methods microsoft#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
1 parent e7df832 commit c2f0c58
Copy full SHA for c2f0c58

5 files changed

+847-823Lines changed: 847 additions & 823 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/lib/es5.d.ts‎

Copy file name to clipboardExpand all lines: src/lib/es5.d.ts
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ declare function encodeURI(uri: string): string;
6262
*/
6363
declare function encodeURIComponent(uriComponent: string): string;
6464

65+
/**
66+
* Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
67+
* @param string A string value
68+
*/
69+
declare function escape(string: string): string;
70+
71+
/**
72+
* Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
73+
* @param string A string value
74+
*/
75+
declare function unescape(string: string): string;
76+
6577
interface PropertyDescriptor {
6678
configurable?: boolean;
6779
enumerable?: boolean;
Collapse file

‎tests/cases/fourslash/completionInJSDocFunctionNew.ts‎

Copy file name to clipboardExpand all lines: tests/cases/fourslash/completionInJSDocFunctionNew.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
////var f = function () { return new/**/; }
77

88
goTo.marker();
9-
verify.completionListCount(115);
9+
verify.completionListCount(117);
1010
verify.completionListContains('new');
Collapse file

‎tests/cases/fourslash/completionInJSDocFunctionThis.ts‎

Copy file name to clipboardExpand all lines: tests/cases/fourslash/completionInJSDocFunctionThis.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
////var f = function (s) { return this/**/; }
66

77
goTo.marker();
8-
verify.completionListCount(116);
8+
verify.completionListCount(118);
99
verify.completionListContains('this');
1010

Collapse file

‎tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts‎

Copy file name to clipboardExpand all lines: tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
//// var x = </**/;
55

66
goTo.marker();
7-
verify.completionListCount(42);
7+
verify.completionListCount(44);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.