Skip to content

Commit bf897c2

Browse files
committed
Add more tests and comments
1 parent 5ced4c4 commit bf897c2

9 files changed

+65
-3
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15367,6 +15367,8 @@ namespace ts {
1536715367
case SpecialPropertyAssignmentKind.ThisProperty:
1536815368
case SpecialPropertyAssignmentKind.ModuleExports:
1536915369
return getSymbolOfNode(entityName.parent.parent);
15370+
default:
15371+
// Fall through if it is not a special property assignment
1537015372
}
1537115373
}
1537215374

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @allowJs: true
4+
// @Filename: a.js
5+
////exports.[|area|] = function (r) { return r * r; }
6+
7+
// @Filename: b.ts
8+
////import { [|area|] } from './a';
9+
////var t = /**/[|area|](10);
10+
11+
goTo.marker();
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @allowJs: true
4+
// @Filename: a.js
5+
////exports./**/[|area|] = function (r) { return r * r; }
6+
7+
// @Filename: b.ts
8+
////import { [|area|] } from './a';
9+
////var t = [|area|](10);
10+
11+
goTo.marker();
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);

tests/cases/fourslash/renameJsExports.ts renamed to tests/cases/fourslash/renameJsExports01.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
////var t = mod./**/[|area|](10);
1010

1111
goTo.marker();
12-
verify.renameLocations(false, false);
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @allowJs: true
4+
// @Filename: a.js
5+
////exports./**/[|area|] = function (r) { return r * r; }
6+
7+
// @Filename: b.js
8+
////var mod = require('./a');
9+
////var t = mod.[|area|](10);
10+
11+
goTo.marker();
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);

tests/cases/fourslash/renameJsPrototypeProperty.ts renamed to tests/cases/fourslash/renameJsPrototypeProperty01.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
////t./**/[|x|] = 11;
1010

1111
goTo.marker();
12-
verify.renameLocations(false, false);
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @allowJs: true
4+
// @Filename: a.js
5+
////function bar() {
6+
////}
7+
////bar.prototype./**/[|x|] = 10;
8+
////var t = new bar();
9+
////t.[|x|] = 11;
10+
11+
goTo.marker();
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);

tests/cases/fourslash/renameJsThisProperty.ts renamed to tests/cases/fourslash/renameJsThisProperty01.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
////t./**/[|x|] = 11;
1010

1111
goTo.marker();
12-
verify.renameLocations(false, false);
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
// @allowJs: true
4+
// @Filename: a.js
5+
////function bar() {
6+
//// this./**/[|x|] = 10;
7+
////}
8+
////var t = new bar();
9+
////t.[|x|] = 11;
10+
11+
goTo.marker();
12+
verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false);

0 commit comments

Comments
 (0)