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

Usage of DOM types #100

Open
nakashkumar opened this issue Jan 12, 2025 · 0 comments
Open

Usage of DOM types #100

nakashkumar opened this issue Jan 12, 2025 · 0 comments
Assignees

Comments

@nakashkumar
Copy link

Hi,

I am integrating Shippo API in the backend and it seems it is using some types of DOM that are not available in the node.js environment:

node_modules/shippo/lib/http.d.ts:1:31 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?

1 export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
                                ~~~~~~~~~~~

node_modules/shippo/lib/sdks.d.ts:35:15 - error TS2304: Cannot find name 'HeadersInit'.

35     headers?: HeadersInit;
                 ~~~~~~~~~~~

Would it be possible to not use these types, but instead create custom interfaces? This makes it hard to integrate in the backend.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants