Skip to content

Commit

Permalink
Apply ihateprettier.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mm2PL committed May 6, 2024
1 parent d9d4126 commit 1d850d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 10 additions & 13 deletions docs/chatterino.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ declare module c2 {
is_valid(): boolean;
}

interface ISharedResource {
}
interface ISharedResource {}

class RoomModes {
unique_chat: boolean;
Expand Down Expand Up @@ -72,35 +71,33 @@ declare module c2 {
static by_twitch_id(id: string): null | Channel;
}


enum HTTPMethod {
Get,
Post,
Put,
Delete,
Patch
Get,
Post,
Put,
Delete,
Patch,
}

type HTTPResult = {
data: string,
status: number,
data: string;
status: number;

error: string
error: string;
};

type HTTPCallback = (res: HTTPResult) => void;
class HTTPRequest implements ISharedResource {
on_success(callback: HTTPCallback): void;
on_error(callback: HTTPCallback): void;
finally(callback: ()=>void): void;
finally(callback: () => void): void;

set_timeout(millis: number): void;
set_payload(data: string): void;
set_header(name: string, value: string): void;

execute(): void;


// might error
static create(method: HTTPMethod, url: string): HTTPRequest;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/wip-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Example:
Allows the plugin to send HTTP requests.

Example:

```json
{
...,
Expand Down Expand Up @@ -401,6 +402,7 @@ the names may change, do not count on them. It has the following keys:
#### `HTTPResult`

An `HTTPResult` is a table that contains the following keys:

```lua
{
data = "This is the data received from the server as a string",
Expand Down

0 comments on commit 1d850d1

Please sign in to comment.