Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lua/wikis/commons/TeamTemplate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ end
--[[
Same as TeamTemplate.getRaw, except that it returns nil if the team template
does not exist.

Throws if `team` is `nil`.
]]
---@param team string
---@param team string?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rather keep the anno as string only, to avoid creating errors

---@param date string|number?
---@return teamTemplateData?
function TeamTemplate.getRawOrNil(team, date)
assert(team ~= nil, 'TeamTemplate.getRawOrNil: \'team\' must not be nil')
team = team:gsub('_', ' '):lower()

-- return mw.ext.TeamTemplate.raw(team, date)
Expand Down
Loading