mirror of
https://github.com/zoriya/lz.n.git
synced 2026-05-31 18:13:01 +00:00
chore: fix luaCATS annotations
This commit is contained in:
+8
-5
@@ -237,17 +237,20 @@ state.new() *state.new*
|
||||
(lz.n.handler.State)
|
||||
|
||||
|
||||
lz.n.handler.State *lz.n.handler.State*
|
||||
|
||||
|
||||
lz.n.handler.State *lz.n.handler.State*
|
||||
|
||||
Fields: ~
|
||||
{insert} (fun(key?:string,plugin:lz.n.Plugin))
|
||||
Insert a plugin (optionally, by key).
|
||||
{insert} (fun(key:string,plugin:lz.n.Plugin)|fun(plugin:lz.n.Plugin))
|
||||
Insert a plugin (optionally, by key).
|
||||
{del} (fun(plugin_name:string,callback?:fun(key:string)))
|
||||
Remove a plugin by its name.
|
||||
Remove a plugin by its name.
|
||||
{has_pending_plugins} (fun(key?:string):boolean)
|
||||
Check if there are pending plugins (optionally, by key)
|
||||
Check if there are pending plugins (optionally, by key)
|
||||
{lookup_plugin} (fun(plugin_name:string):lz.n.Plugin)
|
||||
Lookup a plugin by its name.
|
||||
Lookup a plugin by its name.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -15,7 +15,7 @@ function state.new()
|
||||
|
||||
local DEFAULT_KEY = "lz.n.handler.State.DEFAULT_KEY"
|
||||
|
||||
---@type lz.n.handler.State
|
||||
---@class lz.n.handler.State
|
||||
return {
|
||||
---@overload fun(key: string, plugin: lz.n.Plugin)
|
||||
---@overload fun(plugin: lz.n.Plugin)
|
||||
@@ -87,7 +87,7 @@ end
|
||||
---@class lz.n.handler.State
|
||||
---
|
||||
---Insert a plugin (optionally, by key).
|
||||
---@field insert fun(key?: string, plugin: lz.n.Plugin)
|
||||
---@field insert fun(key: string, plugin: lz.n.Plugin) | fun(plugin: lz.n.Plugin)
|
||||
---
|
||||
---Remove a plugin by its name.
|
||||
---@field del fun(plugin_name: string, callback?: fun(key: string))
|
||||
@@ -100,6 +100,6 @@ end
|
||||
---
|
||||
---Safely apply a callback to all pending plugins
|
||||
---(optionally, by key).
|
||||
---@field each_pending fun(key?: string, callback: fun(plugin: lz.n.Plugin)): string[]
|
||||
---@field each_pending fun(key: string, callback: fun(plugin: lz.n.Plugin)): string[] | fun(callback: fun(plugin: lz.n.Plugin)): string[]
|
||||
|
||||
return state
|
||||
|
||||
Reference in New Issue
Block a user