Skip to content

Commit

Permalink
chore: improve fetch signature usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsMissEm committed Jun 27, 2022
1 parent c9a915e commit 7514e6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion e2e/node/test-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function setupTestResources(
podRoot: string
) {
// Set the user agent to something distinctive to make debug easier
const fetchWithAgent = (url: RequestInfo, options?: RequestInit) => {
const fetchWithAgent: typeof fetch = (url, options?) => {
return session.fetch(url, {
...options,
headers: {
Expand Down
6 changes: 2 additions & 4 deletions src/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class BaseNotification {
gateway?: string;

/** @internal */
fetch: typeof crossFetch;
fetch: typeof fetch;

/** @internal */
protocols: Array<protocols>;
Expand All @@ -64,9 +64,7 @@ export class BaseNotification {
// dependency.
/* eslint consistent-return: 0 */
/** @internal */
static async getDefaultSessionFetch(): Promise<
typeof crossFetch | undefined
> {
static async getDefaultSessionFetch(): Promise<typeof fetch | undefined> {
try {
const { fetch: fetchFn } = await import(
"@inrupt/solid-client-authn-browser"
Expand Down

0 comments on commit 7514e6f

Please sign in to comment.