Skip to content

Commit

Permalink
fix(teal): type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Aug 22, 2022
1 parent 79c55eb commit 1e107c9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lua/gitsigns/git.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions lua/gitsigns/nvim/highlights_compat.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions teal/gitsigns/git.tl
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ Obj.run_blame = function(self: Obj, lines: {string}, lnum: number, ignore_whites
-- If abbrev_head is empty, then assume the repo has no commits
return {
author = 'Not Committed Yet',
['author-mail'] = '<not.committed.yet>',
['author_mail'] = '<not.committed.yet>',
committer = 'Not Committed Yet',
['committer-mail'] = '<not.committed.yet>',
['committer_mail'] = '<not.committed.yet>',
}
end

Expand Down
2 changes: 1 addition & 1 deletion teal/gitsigns/hunks.tl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function M.calc_signs(hunk: Hunk, min_lnum: integer, max_lnum: integer): {Sign}
end
end

local signs = {}
local signs: {Sign} = {}

local cend = change_end(hunk)

Expand Down
8 changes: 3 additions & 5 deletions teal/gitsigns/nvim/highlights_compat.tl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
local M = {}

local type hlval = string|boolean|integer

local function parse_expr(x: hlval): string
local function parse_expr(x: any): string
if not x then
return 'NONE'
end
Expand All @@ -14,7 +12,7 @@ local function parse_expr(x: hlval): string
end
end

local function parse_attrs(x: {string:hlval}): string
local function parse_attrs(x: {string:any}): string
local r: {string} = {}

for k, a in pairs(x) do
Expand All @@ -29,7 +27,7 @@ local function parse_attrs(x: {string:hlval}): string
return 'NONE'
end

function M.highlight(group: string, opts: {string:hlval})
function M.highlight(group: string, opts: {string:any})
local default = opts.default and 'default' or ''
if opts.link then
vim.cmd(table.concat({
Expand Down

0 comments on commit 1e107c9

Please sign in to comment.