Module:Deprecated: Difference between revisions

Content deleted Content added
Created page with "--- Marks items as deprecated, and provides a warning when they are called. -- -- ## Limitations ## -- This module will not provide a warning if a deprecated item is called from -- within the same module that this module is used. -- -- @release alpha -- @author Awesome Aasim -- @function deprecated -- @param {table} p package frame -- @param deprecatedTable -- @return package return function(p, deprecatedTable, replacement) local pckg = {} ---..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1:
--- Marks items as deprecated, and provides a warning when they are called.
--
-- ## Limitations ##
-- This module will not provide a warning if a deprecated item is called from
-- within the same module that this module is used.
--
-- @release alpha
-- @author [[User:Awesome_Aasim|Awesome Aasim]]
Line 16 ⟶ 11:
--- Warn
-- @param {string} text warning text
local function warn(text)
local tb = debug.traceback()
mw.log(text .. '\n' .. tb)