Update docs/syntax-attribute-functions-deprecated.md

Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
This commit is contained in:
Aviral Goel 2024-08-06 09:45:43 -07:00 committed by GitHub
parent 846e4d10fe
commit ef386723f2
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -29,8 +29,10 @@ If `foo` is a member of class `bar`, the warning messages above will start as `"
Consider the following example. Function `printTable` is marked deprecated.
```lua
@[deprecated {use = "table.foreach(table, print)",
reason = "`printTable` forces tables to be printed in one style; `table.foreach` allows configurable printing."}]
@[deprecated {
use = "table.foreach(table, print)",
reason = "`printTable` forces tables to be printed in one style; `table.foreach` allows configurable printing.",
}]
local function printTable(t)
for k,v in pairs(t) do
print(k, v)