Skip to content

Commit

Permalink
doc: add type annotation for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc-stripe committed May 4, 2023
1 parent 29ba485 commit afabd1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/resession/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@
---@field reset nil|boolean|"auto" Close everthing before loading the session (default "auto")
---@field silence_errors nil|boolean Don't error when trying to load a missing session
---@field dir nil|string Name of directory to load from (overrides config.dir)

---@class resession.Extension
---@field on_save fun():any
---@field on_load fun(data: any)
---@field config nil|fun(options: table)
---@field is_win_supported nil|fun(winid: integer, bufnr: integer): boolean
---@field save_win nil|fun(winid: integer): any
---@field load_win nil|fun(winid: integer, data: any): nil|integer

0 comments on commit afabd1b

Please sign in to comment.