According to this post
How to properly initialize en ErrorEvent in javascript?
You should be able to create an EventError
with this code:
var error = new ErrorEvent('oh nose', {
error : new Error('AAAHHHH'),
message : 'A monkey is throwing bananas at me!',
lineno : 402,
filename : 'closet.html'
});
However, if you try this in the TypeScript playground:
It says Supplied parameters do not match any signature of call target.
Even this simple example does not compile:
var error = new ErrorEvent('oh nose');
I have tried to figure it out by looking at the Type Definition
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es6.d.ts#L9612
But can't figure it out.
What is missing to create a perfectly legal EventError
in TypeScript?