Skip to content

Commit 9d966c2

Browse files
Remove ArrowFunction Transform since Closure Compiler has fixed their bug with single argument arrow funcitons
1 parent e14be78 commit 9d966c2

12 files changed

+46
-64
lines changed

src/transformers/arrow-function.ts

-62
This file was deleted.

src/transforms.ts

-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import ExportTransform from './transformers/exports';
2222
import ImportTransform from './transformers/imports';
2323
import StrictTransform from './transformers/strict';
2424
import ConstTransform from './transformers/const';
25-
import ArrowFunctionTransform from './transformers/arrow-function';
2625
import { logSource } from './debug';
2726

2827
/**
@@ -42,7 +41,6 @@ export const createTransforms = (
4241
new StrictTransform(context, options),
4342
new ExportTransform(context, options),
4443
new ImportTransform(context, options),
45-
new ArrowFunctionTransform(context, options),
4644
];
4745
};
4846

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var multipleArguments=(a,b)=>console.log(a,b);export{multipleArguments};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var multipleArguments=(a,b)=>console.log(a,b);export{multipleArguments};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var multipleArguments=function(a,b){return console.log(a,b)};export{multipleArguments};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const multipleArguments = (ar, ar2) => console.log(ar, ar2);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var singleArgument=a=>console.log(a);export{singleArgument};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var singleArgument=a=>console.log(a);export{singleArgument};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var singleArgument=function(a){return console.log(a)};export{singleArgument};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const singleArgument = (ar) => console.log(ar);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS-IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import {generator} from '../generator';
18+
19+
generator('arrow-function', 'multiple-arguments');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS-IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import {generator} from '../generator';
18+
19+
generator('arrow-function', 'single-argument');

0 commit comments

Comments
 (0)