-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
a61d0a4
commit 22f08be
Showing
4 changed files
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Sets the environment to be used by the given function. `fn` can be a Lua | ||
* function or a number that specifies the function at that stack level: Level | ||
* 1 is the function calling `setfenv`. `setfenv` returns the given function. | ||
* | ||
* As a special case, when `fn` is 0, setfenv changes the environment of the | ||
* running thread. In this case, setfenv returns no values. | ||
* | ||
* @param fn A Lua function or the stack level. | ||
* @param environment The new environment. | ||
*/ | ||
declare function setfenv<T extends number | Callback>(fn: T, environment: object): T extends 0 ? undefined : T; | ||
|
||
interface DataModel { | ||
/** | ||
* Sends a HTTP GET request to the given URL and returns the response body. | ||
*/ | ||
HttpGetAsync( | ||
this: DataModel, | ||
url: string, | ||
httpRequestType?: Enum.HttpRequestType, | ||
): LuaTuple<[body: string, code: number]>; | ||
|
||
/** | ||
* Sends a POST request to the specified url, using the specified data and contentType. | ||
*/ | ||
HttpPostAsync( | ||
this: DataModel, | ||
url: string, | ||
data: string, | ||
contentType?: string, | ||
httpRequestType?: Enum.HttpRequestType, | ||
): string; | ||
} |
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