Skip to content

Commit 2d60e37

Browse files
committed
Add a comment explaining why a binding set to window.Event needs an explicit type.
1 parent 171c0cd commit 2d60e37

File tree

1 file changed

+3
-0
lines changed
  • packages/formdata-event/ts_src/environment

1 file changed

+3
-0
lines changed

packages/formdata-event/ts_src/environment/event.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1010
*/
1111

12+
// Without this explicit type, TS seems to think that `window.Event` is the
13+
// wrapper from `wrappers/event.ts` at this point, which is typed in terms of
14+
// this binding, causing a cycle in its type.
1215
export const constructor: typeof Event = window.Event;
1316

1417
export const prototype = constructor.prototype;

0 commit comments

Comments
 (0)