From d2a42970f8cecc67843d38a86dc27f66f8eaacd7 Mon Sep 17 00:00:00 2001 From: Josquin Debaz Date: Thu, 7 Mar 2024 10:31:30 +0100 Subject: [PATCH] B7161682765: Remove event as a function callback --- src/event.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/event.js b/src/event.js index 0780537..68e1d30 100644 --- a/src/event.js +++ b/src/event.js @@ -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) { + that = {} + } + /** * Binds callback to event. The callback will be invoked whenever the event is fired. *