-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #58811 (fix(58801): "Move to file" on globa...) into releas…
…e-5.5 (#58923) Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
- Loading branch information
1 parent
5367ae1
commit 7b1620b
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @Filename: /a.ts | ||
////interface String { | ||
//// reverse(): string; | ||
////} | ||
//// | ||
////[|String.prototype.reverse = function (): string { | ||
//// return this.split("").reverse().join(""); | ||
////}|] | ||
|
||
verify.moveToNewFile({ | ||
newFileContents: { | ||
"/a.ts": | ||
`interface String { | ||
reverse(): string; | ||
} | ||
`, | ||
"/newFile.ts": | ||
`String.prototype.reverse = function(): string { | ||
return this.split("").reverse().join(""); | ||
}; | ||
`, | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @Filename: /a.ts | ||
////[|// this file extends the string prototype | ||
////interface String { | ||
//// reverse(): string; | ||
////} | ||
////String.prototype.reverse = function(): string { | ||
//// return this.split("").reverse().join(""); | ||
////};|] | ||
|
||
verify.moveToNewFile({ | ||
newFileContents: { | ||
"/a.ts": "", | ||
"/String.ts": | ||
`// this file extends the string prototype | ||
interface String { | ||
reverse(): string; | ||
} | ||
String.prototype.reverse = function(): string { | ||
return this.split("").reverse().join(""); | ||
}; | ||
`, | ||
} | ||
}); |