Skip to content

Commit 83ead47

Browse files
committed
refactor(api): request methods
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent f01fa57 commit 83ead47

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/renderer/utils/api/request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { getNextURLFromLinkHeader } from './utils';
2020
export async function performUnauthenticatedRESTRequest<TResult>(
2121
url: Link,
2222
method: Method,
23-
data = {},
23+
data: Record<string, unknown> = {},
2424
): Promise<TResult | null> {
2525
const headers = await getHeaders(url);
2626

@@ -48,7 +48,7 @@ export async function performAuthenticatedRESTRequest<TResult>(
4848
url: Link,
4949
method: Method,
5050
token: Token,
51-
data = {},
51+
data: Record<string, unknown> = {},
5252
fetchAllRecords = false,
5353
): Promise<TResult | null> {
5454
const headers = await getHeaders(url, token);
@@ -105,7 +105,7 @@ export async function performAuthenticatedRESTRequest<TResult>(
105105
* Perform a GraphQL API request with typed operation document
106106
*
107107
* @param url The API url
108-
* @param query The GraphQL operation/query statement TVariables
108+
* @param query The GraphQL operation/query statement
109109
* @param variables The GraphQL operation variables
110110
* @returns Resolves to a GitHub GraphQL response
111111
*/

0 commit comments

Comments
 (0)