Skip to content

Commit

Permalink
chore: simplify create params
Browse files Browse the repository at this point in the history
  • Loading branch information
Aire-One committed Nov 27, 2024
1 parent 09e5688 commit dd7ab41
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions spec/slot_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ describe("Awesome-slot", function()
target = target,
signal = "signal",
slot = function() end,
slot_params = { key = "value" },
}

assert.is_not_nil(s)
Expand All @@ -36,7 +35,6 @@ describe("Awesome-slot", function()
target = target,
signal = "signal",
slot = function() end,
slot_params = { key = "value" },
}

slot.remove(s)
Expand Down Expand Up @@ -93,8 +91,6 @@ describe("Awesome-slot", function()
target = target,
signal = "signal",
slot = function() end,
slot_params = { key = "value" },
connect = true,
}

slot.disconnect(s)
Expand All @@ -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))
Expand All @@ -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))
Expand All @@ -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)
Expand All @@ -158,7 +151,6 @@ describe("Awesome-slot", function()
signal = signal_name,
slot = callback,
slot_params = params,
connect = true,
}

target:emit_signal(signal_name)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/awesome-slot/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dd7ab41

Please sign in to comment.