Skip to content

Commit

Permalink
lint: add more type definitions to fix typechecker
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 27, 2023
1 parent ee57150 commit c7b035d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/dressing/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ local patch = require("dressing.patch")
local util = require("dressing.util")
local M = {}

---@class (exact) dressing.InputContext
---@field opts? dressing.InputOptions
---@field on_confirm? fun(text?: string)
---@field winid? integer
---@field history_idx? integer
---@field history_tip? string
---@field start_in_insert? boolean

---@class (exact) dressing.InputOptions
---@field prompt? string
---@field default? string
---@field completion? string
---@field highlight? string|fun(text: string): any[][]
---@field cancelreturn? string

---@type dressing.InputContext
local context = {
opts = nil,
on_confirm = nil,
Expand Down

0 comments on commit c7b035d

Please sign in to comment.