__spread does not work in IE11
@rbuckton is already working on this.
Since Aug 21, 2019.
Assessment
This issue has not been assessed yet.
Description
This TypeScript code (a Jasmine test):
describe("array spread operator", function() {
it('should be able to spread arguments', function() {
let argumentsArray;
function testFunction() {
argumentsArray = [...arguments];
}
(testFunction as any)(1, 2, 3);
expect(argumentsArray).toEqual([1, 2, 3]);
});
});
runs successfully in browsers but IE.
In IE11, it fails with:
Expected $.length = 1 to equal 3.
Expected $[0] = [object Arguments] to equal 1.
Expected $[1] = undefined to equal 2.
Expected $[2] = undefined to equal 3.
I can see the ... array spread operator gets built into a call for helper __spread, thus submitting the issue here.
Browsers I tried:
- Chrome 76.0.3809.100 64bit
- Opera 62.0.3331.116
- Firefox Quantum 68.0.1 64-bit
- Internet Explorer 11.309.16299.0
- Microsoft Edge 41.16299.248.0
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/tslib
-
question
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 1/5 Under an hour Newbie friendliness 15/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·