-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Description
TypeScript Version: 3.2.0
Search Terms:
EDGE out of stack space async await ES6
Code
// tsconfig.json
{
"compilerOptions": {
"module": "es6",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}// main.ts
const appDiv: HTMLElement = document.getElementById('app');
appDiv.innerHTML = `<h1>TypeScript async/await transpile problem in EDGE whe targeting ES6</h1><button id="test">Open console and click me!</button>`;
abstract class TestBase {
public async FunctionBase() {
return true;
}
}
class TestDerived extends TestBase {
public async FunctionBase() {
let result = await super.FunctionBase();
return result || true;
}
}
var x = new TestDerived();
appDiv.querySelector("#test").addEventListener("click", () => {
x.FunctionBase().then(v => {
alert("ok!");
}).catch(err => {
alert("error!");
});
});Expected behavior:
No problem.
Actual behavior:
Compiling this code with target set to ES5 works well in all tested browsers (Chrome, Firefox, EDGE 18)
Compiling this code with target set to ES6 I have this behaviour:
- Chrome OK!
- Firefox OK!
- EDGE error: "out of stack space"
Playground Link:
Related Issues:
not found
AleksueiR
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.