-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
89 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
__tests__/test-data/offline-sites/gmod-wiki/library-function-concommand-gettable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const markup = `<function name="GetTable" parent="concommand" type="libraryfunc"> | ||
<description>Returns the tables of all console command callbacks, and autocomplete functions, that were added to the game with <page>concommand.Add</page>. | ||
</description> | ||
<realm>Shared and Menu</realm> | ||
<file line="16-L22">lua/includes/modules/concommand.lua</file> | ||
<rets> | ||
<ret name="" type="table">Table of command callback functions.</ret> | ||
<ret name="" type="table">Table of command autocomplete functions.</ret> | ||
</rets> | ||
</function>`; | ||
|
||
export const apiDefinition = | ||
`concommand = {} | ||
---[SHARED AND MENU] Returns the tables of all console command callbacks, and autocomplete functions, that were added to the game with concommand.Add. | ||
--- | ||
---[(View on wiki)](https://wiki.facepunch.com/gmod/concommand.GetTable) | ||
---@return table # Table of command callback functions. | ||
---@return table # Table of command autocomplete functions. | ||
function concommand.GetTable() end\n\n`; |
24 changes: 24 additions & 0 deletions
24
__tests__/test-data/offline-sites/gmod-wiki/library-function-coroutine-resume.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export const markup = `<function name="resume" parent="coroutine" type="libraryfunc"> | ||
<description>Resumes the given coroutine and passes the given vararg to either the function arguments or the <page>coroutine.yield</page> that is inside that function and returns whatever yield is called with the next time or by the final return in the function.</description> | ||
<realm>Shared and Menu</realm> | ||
<args> | ||
<arg name="coroutine" type="thread">Coroutine to resume.</arg> | ||
<arg name="args" type="vararg">Arguments to be returned by <page>coroutine.yield</page>.</arg> | ||
</args> | ||
<rets> | ||
<ret name="" type="boolean">If the executed thread code had no errors occur within it.</ret> | ||
<ret name="" type="vararg">If an error occurred, this will be a string containing the error message. Otherwise, this will be arguments that were yielded.</ret> | ||
</rets> | ||
</function>`; | ||
|
||
export const apiDefinition = | ||
`coroutine = {} | ||
---[SHARED AND MENU] Resumes the given coroutine and passes the given vararg to either the function arguments or the coroutine.yield that is inside that function and returns whatever yield is called with the next time or by the final return in the function. | ||
--- | ||
---[(View on wiki)](https://wiki.facepunch.com/gmod/coroutine.resume) | ||
---@param coroutine thread Coroutine to resume. | ||
---@param ... any Arguments to be returned by coroutine.yield. | ||
---@return boolean # If the executed thread code had no errors occur within it. | ||
---@return any ... # If an error occurred, this will be a string containing the error message. Otherwise, this will be arguments that were yielded. | ||
function coroutine.resume(coroutine, ...) end\n\n`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters