TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
document.dispatchEvent(new CustomEvent('test-event', { detail: { foo: 'bar' }, bubbles: true, composed: true }));
Expected behavior:
Utilizing the 'composed' property should work. As per the WHATWG Living Standard the 'scoped' and 'deepPath' properties of an Event have been replaced with 'composed' and 'composedPath' respectively (see https://dom.spec.whatwg.org/)
Actual behavior:
Argument of type '{ detail: { term: string; }; bubbles: true; composed: boolean; }' is not assignable to parameter of type 'CustomEventInit'.
Object literal may only specify known properties, and 'composed' does not exist in type 'CustomEventInit'.
TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
Code
Expected behavior:
Utilizing the 'composed' property should work. As per the WHATWG Living Standard the 'scoped' and 'deepPath' properties of an Event have been replaced with 'composed' and 'composedPath' respectively (see https://dom.spec.whatwg.org/)
Actual behavior:
Argument of type '{ detail: { term: string; }; bubbles: true; composed: boolean; }' is not assignable to parameter of type 'CustomEventInit'.
Object literal may only specify known properties, and 'composed' does not exist in type 'CustomEventInit'.