Skip to content

Commit

Permalink
B7161682765: Remove event as a function callback
Browse files Browse the repository at this point in the history
  • Loading branch information
josquindebaz committed Mar 7, 2024
1 parent 0c3b2b7 commit d2a4297
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/event.js
Expand Up @@ -9,20 +9,14 @@
export default function event(spec, my) {
my ||= {};

// DEPRECATED: use that.register() instead.
function that(callback) {
// eslint-disable-next-line no-console
console.warn(
"Using an event as a function is deprecated. Send register() to the event instead.",
);

return that.register(callback);
}

let bindings = [];

// #### Public API

function that(callbak) {

Check failure on line 16 in src/event.js

View workflow job for this annotation

GitHub Actions / build (lts/*)

'callbak' is defined but never used. Allowed unused args must match /^_/u
that = {}

Check failure on line 17 in src/event.js

View workflow job for this annotation

GitHub Actions / build (lts/*)

'that' is a function

Check failure on line 17 in src/event.js

View workflow job for this annotation

GitHub Actions / build (lts/*)

Insert `;`
}

/**
* Binds callback to event. The callback will be invoked whenever the event is fired.
*
Expand Down

0 comments on commit d2a4297

Please sign in to comment.