Repository navigation
Minify more type constructors - #45
Conversation
| (function (Boolean, String, Number) { | ||
| return Boolean(a), String(b), Number(c); | ||
| })(MyBoolean, MyString, MyNumber); | ||
| (function (Boolean, String, Number, Object) { |
There was a problem hiding this comment.
I see that you're testing for local binding so we should just add it here to the test.
There was a problem hiding this comment.
Yes, missed that. I squashed the commits in a sensible way and added Array there.
0172071 to
31891f6
Compare
31891f6 to
9a84e1b
Compare
3a97a11 to
e8016c3
Compare
e8016c3 to
e5a2d37
Compare
| expect(transform(source)).toBe(expected); | ||
| }); | ||
|
|
||
| it("should turn Array(number) to [,] only if number is <=6", () => { |
There was a problem hiding this comment.
The only issue here is oldIE: [,].length is 2 in IE8- and 1 everywhere else.
Specifically, none of these work correctly there:
Array(1);
Array(2);
Array(3);
Array(4);
Array(5);
Array(6);Are you going to support IE8 anywhere else?
There was a problem hiding this comment.
Not sure if it's worth supporting IE8. But we need to at least mention this in the docs.
There was a problem hiding this comment.
I'd vote we document it for now, we could always have a separate transform to run through and pick out stuff like this that IE would choke on.
|
We need to also figure out how to denote plugins as safe (always identical functionality) or unsafe (identical functionality in most cases but not always). The |
|
Unsafe in IE8- only, right? |
This thing is awesome: https://astexplorer.net/