Skip to content

Commit 8a44075

Browse files
chore: lint & fmt
1 parent d55e815 commit 8a44075

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* for other functions to use the information. A great use of this would be provide a `guildID`
1515
* parameter and pass it on to an error directly without searching for it in the URL. In code,
1616
* this could look like this:
17-
*
17+
*
1818
* ```ts
1919
* async function fetchAndHandleError<T>(ctx: Context, url: string): Promise<T> {
2020
* const response = await fetch(url);
@@ -29,19 +29,19 @@
2929
* // Default error.
3030
* throw 'There was an error, but it could not be identified.';
3131
* }
32-
*
32+
*
3333
* async function guildName(guildID: StringifiedNumber): Promise<string> {
3434
* const response = await fetchAndHandleError<Guild.GET.Guild>(
3535
* new Context({ guildID }),
3636
* `https://pylon.bot/api/guilds/${guildID}`,
3737
* );
3838
* return response.name;
3939
* }
40-
*
40+
*
4141
* const guildID: StringifiedNumber = '0';
4242
* console.log(await guildName(guildID));
4343
* ```
44-
*
44+
*
4545
* Here, {@linkcode Context} is leveraged to discover what the `guildID` parameter was
4646
* without searching through the URL (where, it may possibly return a wrong parsed value,
4747
* like a regex edge case). It provided environmental parameters directly to eliminate

0 commit comments

Comments
 (0)