From dd7ab4174921a2f48a09829bbfbc43aecdb6ea85 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Thu, 28 Nov 2024 00:40:25 +0100 Subject: [PATCH] chore: simplify `create` params --- spec/slot_spec.lua | 9 --------- src/awesome-slot/init.lua | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/spec/slot_spec.lua b/spec/slot_spec.lua index 49e8997..00b279c 100644 --- a/spec/slot_spec.lua +++ b/spec/slot_spec.lua @@ -23,7 +23,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, } assert.is_not_nil(s) @@ -36,7 +35,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, } slot.remove(s) @@ -93,8 +91,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, - connect = true, } slot.disconnect(s) @@ -109,7 +105,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, } assert.is_not_nil(slot.get_slot(s)) @@ -124,7 +119,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, } assert.is_not_nil(slot.get_slot(id)) @@ -137,7 +131,6 @@ describe("Awesome-slot", function() target = target, signal = "signal", slot = function() end, - slot_params = { key = "value" }, } assert.is_not_nil(s.id) @@ -158,7 +151,6 @@ describe("Awesome-slot", function() signal = signal_name, slot = callback, slot_params = params, - connect = true, } target:emit_signal(signal_name) @@ -180,7 +172,6 @@ describe("Awesome-slot", function() target = target, signal = signal_name, slot = callback, - connect = true, } target:emit_signal(signal_name, 1, 2, 3) diff --git a/src/awesome-slot/init.lua b/src/awesome-slot/init.lua index 41cfff3..90aad3c 100644 --- a/src/awesome-slot/init.lua +++ b/src/awesome-slot/init.lua @@ -107,7 +107,7 @@ end -- @tparam any params.target The slot target object. -- @tparam string params.signal The signal the slot connects to. -- @tparam function params.slot The callback function to connect to the signal. --- @tparam table params.slot_params The parameters to pass to the callback +-- @tparam[opt] table params.slot_params The parameters to pass to the callback -- function. (The signal will invoke the callback function with this table as -- parameter) -- @tparam[opt=true] boolean params.connect Connect the slot now.