Skip to content

Commit

Permalink
fix(tests): update comment location after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwils committed May 29, 2024
1 parent 0c29991 commit 76b61aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/event-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export function AddEvents<TBase extends Constructor, U>(Base: TBase, path?: stri

/**
* Get the event object from the given instance. If a path is given, the object will be traversed
* using the path. If the event object is not found, an error will be thrown.
* using the path. If the event object is not found, an error will be thrown. Even though we bypass
* type safety in the call (casting instance as any), we've enforced it in the method signature
* above, so it's still safe.
*
* @param instance - The instance to get the event object from.
* @param eventName - The name of the event to get.
Expand All @@ -70,8 +72,6 @@ export function AddEvents<TBase extends Constructor, U>(Base: TBase, path?: stri
* @param handler - The handler to invoke when the event is fired.
*/
on<K extends keyof U, E extends eventHandlerType<U[K]>>(eventName: K, handler: E) {
// Even though we bypass type safety in the call (casting this as any), we've enforced it in the
// method signature above, so it's still safe.
getEvent(this, eventName).on(handler);
}

Expand Down

0 comments on commit 76b61aa

Please sign in to comment.