Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8876a37
commit 7361f7a
Showing
10 changed files
with
79 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
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
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
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-classes/test/fixtures/assumption-noCallClass/class/input.js
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 @@ | ||
class A {} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-classes/test/fixtures/assumption-noCallClass/class/output.js
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,3 @@ | ||
var A = function A() { | ||
"use strict"; | ||
}; |
12 changes: 12 additions & 0 deletions
12
packages/babel-plugin-transform-classes/test/fixtures/assumption-noCallClass/options.json
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,12 @@ | ||
{ | ||
"plugins": [ | ||
["external-helpers", { "helperVersion": "7.100.0" }], | ||
"transform-function-name", | ||
"transform-classes", | ||
["transform-spread", { "loose": true }], | ||
"transform-block-scoping" | ||
], | ||
"assumptions": { | ||
"noCallClass": true | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...l-plugin-transform-classes/test/fixtures/assumption-noCallClass/with-constructor/input.js
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,11 @@ | ||
class A { | ||
constructor() { | ||
console.log('a'); | ||
} | ||
} | ||
|
||
class B { | ||
b() { | ||
console.log('b'); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...-plugin-transform-classes/test/fixtures/assumption-noCallClass/with-constructor/output.js
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,19 @@ | ||
var A = function A() { | ||
"use strict"; | ||
|
||
console.log('a'); | ||
}; | ||
|
||
var B = /*#__PURE__*/function () { | ||
"use strict"; | ||
|
||
function B() {} | ||
|
||
babelHelpers.createClass(B, [{ | ||
key: "b", | ||
value: function b() { | ||
console.log('b'); | ||
} | ||
}]); | ||
return B; | ||
}(); |
8 changes: 8 additions & 0 deletions
8
...el-plugin-transform-classes/test/fixtures/assumption-noCallClass/with-superClass/input.js
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,8 @@ | ||
class B {} | ||
|
||
class A extends B { | ||
constructor(track) { | ||
if (track !== undefined) super(track); | ||
else super(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...l-plugin-transform-classes/test/fixtures/assumption-noCallClass/with-superClass/output.js
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,20 @@ | ||
var B = function B() { | ||
"use strict"; | ||
}; | ||
|
||
var A = /*#__PURE__*/function (_B) { | ||
"use strict"; | ||
|
||
babelHelpers.inherits(A, _B); | ||
|
||
var _super = babelHelpers.createSuper(A); | ||
|
||
function A(track) { | ||
var _this; | ||
|
||
if (track !== undefined) _this = _super.call(this, track);else _this = _super.call(this); | ||
return babelHelpers.possibleConstructorReturn(_this); | ||
} | ||
|
||
return A; | ||
}(B); |