Skip to content

Commit b13e866

Browse files
committed
style: add some more type annotations
1 parent 4b673be commit b13e866

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lua/wincent/commandt/test/matcher.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@
44
local ffi = require('ffi')
55
local fixtures = require('wincent.commandt.test.fixtures')
66

7+
--- @alias Matcher {
8+
--- match: (fun(query: string): string[]),
9+
--- _scanner: userdata,
10+
--- _matcher: userdata,
11+
--- }
12+
713
describe('matcher.c', function()
814
local lib = require('wincent.commandt.private.lib')
915

10-
local get_matcher = function(paths, options)
16+
--- @param paths string[]
17+
--- @param options? {
18+
--- height?: number,
19+
--- ignore_case?: boolean,
20+
--- ignore_spaces?: boolean,
21+
--- smart_case?: boolean,
22+
--- }
23+
--- @return Matcher
24+
local function get_matcher(paths, options)
1125
options = options or {}
1226
local scanner = lib.scanner_new_copy(paths)
1327
local matcher = lib.matcher_new(scanner, options)
@@ -27,6 +41,7 @@ describe('matcher.c', function()
2741
end
2842

2943
context('with an empty scanner', function()
44+
--- @type Matcher
3045
local matcher = nil
3146

3247
before(function()

0 commit comments

Comments
 (0)