Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip TSAsExpression when transforming spread in CallExpression #11404

Merged
merged 30 commits into from Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
087405e
Skip TSAsExpression when transforming spread in CallExpression
oliverdunk Apr 10, 2020
dc5316e
Merge branch 'master' into od/11400-typescript-spread-as
oliverdunk Apr 10, 2020
e090927
Create @babel/helper-get-call-context package
oliverdunk May 3, 2020
b41cc10
Support OptionalCallExpressions
oliverdunk May 4, 2020
f406e41
Merge branch 'master' into od/11400-typescript-spread-as
oliverdunk May 4, 2020
a0bb643
Merge branch 'master' into od/11400-typescript-spread-as
oliverdunk May 16, 2020
2bdb62d
Use helper in optional chaining plugin, and move tests
oliverdunk May 17, 2020
06d092f
Update package.json files
oliverdunk May 23, 2020
ed10970
Use dot notation to access property
oliverdunk May 23, 2020
1d957b3
Remove private method tests until future MR
oliverdunk May 23, 2020
5d7c306
Update packages/babel-plugin-transform-spread/package.json
nicolo-ribaudo May 23, 2020
defdad1
Rename @babel/helper-get-call-context to @babel/helper-skip-transpare…
oliverdunk May 23, 2020
8c3b44b
Handle typed OptionalMemberExpressions
oliverdunk May 24, 2020
db8f8c3
Make @babel/helper-skip-transparent-expr-wrappers a dependency
oliverdunk May 24, 2020
b4948cf
Merge branch 'master' into od/11400-typescript-spread-as
oliverdunk May 31, 2020
c69c921
Support TSNonNullExpressions
oliverdunk May 31, 2020
db8f57a
Use named import instead of default
oliverdunk May 31, 2020
117bb67
Merge branch 'master' into od/11400-typescript-spread-as
oliverdunk Jun 1, 2020
4e49c03
Add test for call context when parenthesized call expression has type
oliverdunk Jun 1, 2020
c0ecd48
Merge branch 'main' into od/11400-typescript-spread-as
oliverdunk Jun 29, 2020
e40676b
Improve handling of member expressions inside transparent expression …
oliverdunk Jun 29, 2020
dd1b57d
Add comment explaining what a transparent expression wrapper is
oliverdunk Jun 29, 2020
4250471
Add newlines to test fixtures
oliverdunk Jun 29, 2020
24d550a
Merge branch 'main' into od/11400-typescript-spread-as
oliverdunk Jun 30, 2020
7069abe
Pass correct parameter type to skipTransparentExprWrappers
oliverdunk Jun 30, 2020
0704742
Rename to babel-helper-skip-transparent-expression-wrappers
oliverdunk Jul 3, 2020
f6cc6e2
Remove getCallContext helper
oliverdunk Jul 3, 2020
cea347f
Fixed exports key
oliverdunk Jul 3, 2020
d654efc
Preserve types in babel-plugin-transform-spread tests
oliverdunk Jul 3, 2020
e6c3a4c
Use external-helpers to avoid inlining helper functions in tests
oliverdunk Jul 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,7 +1,10 @@
{
"presets": [
"plugins": [
[
"flow"
"transform-spread"
oliverdunk marked this conversation as resolved.
Show resolved Hide resolved
],
[
"syntax-flow"
]
]
}
@@ -1,3 +1,15 @@
var _a;

(_a = a).b.apply(_a, babelHelpers.toConsumableArray(args));
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

((_a = a).b: any).apply(_a, _toConsumableArray(args));
@@ -1,7 +1,10 @@
{
"presets": [
"plugins": [
[
"typescript"
"transform-spread"
],
[
"syntax-typescript"
]
]
}
@@ -1,3 +1,15 @@
var _a;

(_a = a).b.apply(_a, babelHelpers.toConsumableArray(args));
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

(<any> (_a = a).b).apply(_a, _toConsumableArray(args));