Skip to content

Commit 03af286

Browse files
chore(types): Fix few annotations
1 parent dafe433 commit 03af286

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

lua/orgmode/capture/templates.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ local Template = require('orgmode.capture.template')
77
---@field templates table<string, OrgCaptureTemplate>
88
local Templates = {}
99

10+
---@param templates table<string, OrgCaptureTemplate>
11+
---@return OrgCaptureTemplates
1012
function Templates:new(templates)
1113
local opts = {}
1214

lua/orgmode/files/file.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ local Link = require('orgmode.org.hyperlinks.link')
1111
---@field mtime number
1212
---@field changedtick number
1313

14+
---@class OrgFileOpts
15+
---@field filename string
16+
---@field lines string[]
17+
---@field bufnr? number
18+
1419
---@class OrgFile
1520
---@field filename string
1621
---@field lines string[]
@@ -28,10 +33,6 @@ local memoize = utils.memoize(OrgFile, function(self)
2833
}, '_')
2934
end)
3035

31-
---@class OrgFileOpts
32-
---@field filename string
33-
---@field lines string[]
34-
---@field bufnr? number
3536
---Constructor function, should not be used directly
3637
---@param opts OrgFileOpts
3738
---@return OrgFile
@@ -680,7 +681,7 @@ function OrgFile:_update_lines(lines, bufnr)
680681
end
681682

682683
---@private
683-
---@return LanguageTree
684+
---@return vim.treesitter.LanguageTree
684685
function OrgFile:_get_parser()
685686
local bufnr = self:bufnr()
686687

lua/orgmode/utils/promise.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ end
3030

3131
--- @generic T : any
3232
--- @generic V : any
33-
--- @class OrgPromise<T, V>: { next: fun(self: OrgPromise<T>, resolve:fun(result:T):V), wait: fun(self: OrgPromise<T>, timeout?: number):V }
33+
--- @class OrgPromise<T, V>: { next: fun(self: OrgPromise<T>, resolve:fun(result:T):V), catch: fun(self: OrgPromise<T>, reject:fun(err:any)), wait: fun(self: OrgPromise<T>, timeout?: number):V }
3434
local Promise = {}
3535
Promise.__index = Promise
3636

0 commit comments

Comments
 (0)