From e7295ce1dd304dbe03c61ea63018f3373a43db40 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:28:33 +0900 Subject: [PATCH 1/2] use super --- lua/wikis/smash/Infobox/League/Custom.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/wikis/smash/Infobox/League/Custom.lua b/lua/wikis/smash/Infobox/League/Custom.lua index d35dcebe5e1..07a43996468 100644 --- a/lua/wikis/smash/Infobox/League/Custom.lua +++ b/lua/wikis/smash/Infobox/League/Custom.lua @@ -34,7 +34,7 @@ local MANUAL_SERIES_ICON = 1 local UNKNOWN_DATE_PART = '??' --- @class SmashLeagueInfobox: InfoboxLeague ---- @field _base InfoboxLeague +--- @field super fun(self: SmashLeagueInfobox): InfoboxLeague local CustomLeague = Class.new(League) local CustomInjector = Class.new(Injector) @@ -125,7 +125,7 @@ function CustomLeague:createLiquipediaTierDisplay(args) return nil end - return self._base.createLiquipediaTierDisplay(self, args) + return self:super():createLiquipediaTierDisplay(args) end --- @param args table From aabb4c26c534c58415a908cdf4fa9b480ed0eb1d Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:28:41 +0900 Subject: [PATCH 2/2] type annotation --- lua/wikis/commons/Infobox/Basic.lua | 2 +- lua/wikis/smash/Infobox/League/Custom.lua | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/wikis/commons/Infobox/Basic.lua b/lua/wikis/commons/Infobox/Basic.lua index c867569723f..66e40539883 100644 --- a/lua/wikis/commons/Infobox/Basic.lua +++ b/lua/wikis/commons/Infobox/Basic.lua @@ -16,7 +16,7 @@ local Table = Lua.import('Module:Table') local Info = Lua.import('Module:Info') local Infobox = Lua.import('Module:Widget/Infobox/Core') ----@class BasicInfobox +---@class BasicInfobox: BaseClass ---@operator call(Frame): BasicInfobox ---@field args table ---@field pagename string diff --git a/lua/wikis/smash/Infobox/League/Custom.lua b/lua/wikis/smash/Infobox/League/Custom.lua index 07a43996468..3bb030d3a16 100644 --- a/lua/wikis/smash/Infobox/League/Custom.lua +++ b/lua/wikis/smash/Infobox/League/Custom.lua @@ -33,13 +33,18 @@ local DEFAULT_TYPE = 'offline' local MANUAL_SERIES_ICON = 1 local UNKNOWN_DATE_PART = '??' ---- @class SmashLeagueInfobox: InfoboxLeague ---- @field super fun(self: SmashLeagueInfobox): InfoboxLeague +---@class SmashLeagueInfobox: InfoboxLeague +---@operator call(Frame): SmashLeagueInfobox +---@field super fun(self: SmashLeagueInfobox): InfoboxLeague local CustomLeague = Class.new(League) + +---@class SmashLeagueInfoboxWidgetInjector: WidgetInjector +---@operator call(SmashLeagueInfobox): SmashLeagueInfoboxWidgetInjector +---@field caller SmashLeagueInfobox local CustomInjector = Class.new(Injector) --- @param frame Frame ---- @return Html +--- @return Widget function CustomLeague.run(frame) local league = CustomLeague(frame) league:setWidgetInjector(CustomInjector(league))