fix: types (#208)

This commit is contained in:
yetone
2024-08-25 14:26:42 +08:00
committed by GitHub
parent b494d05c9d
commit ee88563215
4 changed files with 33 additions and 4 deletions

26
lua/avante/types.lua Normal file
View File

@@ -0,0 +1,26 @@
---@meta
---@class AvanteComp
---@field winid integer | nil
---@field bufnr integer | nil
local AvanteComp = {}
---@return nil
function AvanteComp:mount() end
---@return nil
function AvanteComp:unmount() end
---@param event string | string[]
---@param handler string | function
---@param options? table<"'once'" | "'nested'", boolean>
---@return nil
function AvanteComp:on(event, handler, options) end
-- set keymap for this split
---@param mode string check `:h :map-modes`
---@param key string|string[] key for the mapping
---@param handler string | fun(): nil handler for the mapping
---@param opts? table<"'expr'"|"'noremap'"|"'nowait'"|"'remap'"|"'script'"|"'silent'"|"'unique'", boolean>
---@return nil
function AvanteComp:map(mode, key, handler, opts, ___force___) end