Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Aug 12, 2024
1 parent e52adaa commit 556404f
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions types/three/test/unit/src/core/EventDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,7 @@ eveDisForTestEvent.addEventListener("bar", e => {
});

// @ts-expect-error
eveDisForTestEvent.addEventListener("baz", e => {
e.type; // $ExpectType "baz"
e.target; // $ExpectType EventDispatcher<TestEvent>
// @ts-expect-error
e.bar;
// @ts-expect-error
e.foo;
// @ts-expect-error
e.bar();
});
// @ts-expect-error
eveDisForTestEvent.addEventListener("NotRegistered", e => {
e.type; // $ExpectType "NotRegistered"
e.target; // $ExpectType EventDispatcher<TestEvent>
// @ts-expect-error
e.bar;
// @ts-expect-error
e.foo;
// @ts-expect-error
e.bar();
});
eveDisForTestEvent.addEventListener("baz", e => {});

eveDisForTestEvent.dispatchEvent({ type: "foo", foo: 42 });
eveDisForTestEvent.dispatchEvent({ type: "bar", bar: "42" });
Expand Down

0 comments on commit 556404f

Please sign in to comment.