Skip to content

Commit

Permalink
Updates the types of proposed API relying on DOM (#16390)
Browse files Browse the repository at this point in the history
* Updates the types of proposed API relying on DOM

* oops
  • Loading branch information
DonJayamanne authored Jan 20, 2025
1 parent 5fe5bb5 commit f5fb0e0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/api.proposed.jupyterSettings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ declare module './api' {
export interface JupyterServerConnectionInformation {
/**
* The `fetch` method to use.
* The types of the parameters are not defined so as to avoid enforcing the use of `DOM` in `tsconfig.json`.
* The signature of this method matches the `fetch` method in the browser.
* https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch
* fetch(input: RequestInfo, init?: RequestInit) =>Promise<Response>;
*/
readonly fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
readonly fetch?: (input: any, init?: any) => Promise<any>;
/**
* The `WebSocket` object constructor.
* This matches the `WebSocket` object in the browser.
* https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
* `typeof WebSocket`, made `any` so that `DOM` is not required in tsconfig for those not using this.
*/
readonly WebSocket?: typeof WebSocket;
readonly WebSocket?: any;
}
}

0 comments on commit f5fb0e0

Please sign in to comment.