Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates the types of proposed API relying on DOM #16390

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
Loading