Fixup Lua docs

This commit is contained in:
Ottatop 2024-02-23 17:49:09 -06:00
parent d1e7c92774
commit 3959a87019
2 changed files with 8 additions and 5 deletions

View file

@ -8,6 +8,7 @@ local h2_connection = require("http.h2_connection")
local protobuf = require("pinnacle.grpc.protobuf")
local pb = require("pb")
---@nodoc
---Create appropriate headers for a gRPC request.
---@param service string The desired service
---@param method string The desired method within the service

View file

@ -51,6 +51,7 @@ local stream_control = {
-- TODO: rewrite ldoc_gen so you don't have to stick @nodoc everywhere
---@nodoc
---@type table<SignalServiceMethod, { sender: H2Stream?, callbacks: function[], on_response: fun(response: table) }>
local signals = {
OutputConnect = {
@ -142,19 +143,20 @@ end
---@class SignalHandleModule
local signal_handle = {}
---@classmod
---A handle to a connected signal that can be used to disconnect the provided callback.
---
---@class SignalHandle
---@field signal SignalServiceMethod
---@field callback function The callback you connected
---@field private signal SignalServiceMethod
---@field private callback function The callback you connected
local SignalHandle = {}
---@nodoc
---@class SignalHandlesModule
local signal_handles = {}
---@nodoc
---@class SignalHandles
---@classmod
---@class SignalHandles A collection of `SignalHandle`s retreived through a `connect_signal` function.
local SignalHandles = {}
---@nodoc
@ -165,7 +167,7 @@ local signal = {}
signal.handle = signal_handle
signal.handles = signal_handles
---@nodoc
---Disconnect the provided callback from this signal.
function SignalHandle:disconnect()
local cb_index = nil
for i, cb in ipairs(signals[self.signal].callbacks) do