You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/emmylua_code_analysis/resources/std/global.lua
+66-8Lines changed: 66 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,17 @@
24
24
---@returnstd.NotNull<T>
25
25
functionassert(v, message) end
26
26
27
+
---@aliasstd.collectgarbage_opt
28
+
---|>"collect" # performs a full garbage-collection cycle. This is the default option.
29
+
---| "stop" # stops automatic execution of the garbage collector. The collector will run only when explicitly invoked, until a call to restart it.
30
+
---| "restart" # restarts automatic execution of the garbage collector.
31
+
---| "count" # returns the total memory in use by Lua in Kbytes. The value has a fractional part, so that it multiplied by 1024 gives the exact number of bytes in use by Lua (except for overflows).
32
+
---| "step" # performs a garbage-collection step. The step "size" is controlled by `arg`. With a zero value, the collector will perform one basic (indivisible) step. For non-zero values, the collector will perform as if Lua had allocated that amount of memory (in KBytes). Returns true if the step finished a collection cycle.
33
+
---| "setpause" # sets `arg` as the new value for the *pause* of the collector (see §2.5). Returns the previous value for *pause`.
34
+
---| "incremental" # Change the collector mode to incremental. This option can be followed by three numbers: the garbage-collector pause, the step multiplier, and the step size.
35
+
---| "generational" # Change the collector mode to generational. This option can be followed by two numbers: the garbage-collector minor multiplier and the major multiplier.
36
+
---| "isrunning" # returns a boolean that tells whether the collector is running (i.e., not stopped).
37
+
27
38
---
28
39
--- This function is a generic interface to the garbage collector. It performs
29
40
--- different functions according to its first argument, `opt`:
@@ -51,11 +62,10 @@ function assert(v, message) end
51
62
--- the major multiplier.
52
63
--- **"isrunning"**: returns a boolean that tells whether the collector is
0 commit comments