mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-20 05:30:57 +01:00
Correct some type annotations in bridge.lua
This commit is contained in:
parent
988a68e237
commit
bc26b7c7af
23
bridge.lua
23
bridge.lua
@ -249,7 +249,7 @@ return function(_python, _bridged)
|
|||||||
return file
|
return file
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param file file*
|
---@param file? file*
|
||||||
local function new_close_pre(file)
|
local function new_close_pre(file)
|
||||||
if file == nil then
|
if file == nil then
|
||||||
file = io.output()
|
file = io.output()
|
||||||
@ -263,7 +263,7 @@ return function(_python, _bridged)
|
|||||||
|
|
||||||
---@param f fun(file?: file*)
|
---@param f fun(file?: file*)
|
||||||
local function _new_close(f)
|
local function _new_close(f)
|
||||||
---@param file file*?
|
---@param file? file*
|
||||||
return function(file)
|
return function(file)
|
||||||
new_close_pre(file)
|
new_close_pre(file)
|
||||||
return f(file)
|
return f(file)
|
||||||
@ -1350,15 +1350,14 @@ return function(_python, _bridged)
|
|||||||
koboldbridge.outmod = nil ---@type function?
|
koboldbridge.outmod = nil ---@type function?
|
||||||
|
|
||||||
---@class KoboldUserScript
|
---@class KoboldUserScript
|
||||||
---@field inmod function?
|
---@field inmod? function
|
||||||
---@field genmod function?
|
---@field genmod? function
|
||||||
---@field outmod function?
|
---@field outmod? function
|
||||||
---@field config file*
|
|
||||||
|
|
||||||
---@class KoboldCoreScript
|
---@class KoboldCoreScript
|
||||||
---@field inmod function?
|
---@field inmod? function
|
||||||
---@field genmod function?
|
---@field genmod? function
|
||||||
---@field outmod function?
|
---@field outmod? function
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
@ -1368,9 +1367,9 @@ return function(_python, _bridged)
|
|||||||
---@field modulename string
|
---@field modulename string
|
||||||
---@field description string
|
---@field description string
|
||||||
---@field is_config_file_open boolean
|
---@field is_config_file_open boolean
|
||||||
---@field inmod function?
|
---@field inmod? function
|
||||||
---@field genmod function?
|
---@field genmod? function
|
||||||
---@field outmod function?
|
---@field outmod? function
|
||||||
local KoboldUserScriptModule = setmetatable({
|
local KoboldUserScriptModule = setmetatable({
|
||||||
_name = "KoboldUserScriptModule",
|
_name = "KoboldUserScriptModule",
|
||||||
}, metawrapper)
|
}, metawrapper)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user