Skip to content

Conversation

@jacob-ebey
Copy link
Contributor

fix(packages/stream): no initializers in ambient contexts
fix(packages/fetch): only export what's needed so TS doesn't mess up the imports in the output files

Projects that import from web-std currently get some nasty errors such as:

node_modules/@web-std/stream/src/lib.d.ts:18:5 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

18 } = globalThis
       ~~~~~~~~~~

and

node_modules/@web-std/fetch/dist/src/fetch.d.ts:5:32 - error TS2307: Cannot find module 'packages/stream/src/lib.js' or its corresponding type declarations.

5 import { ReadableStream } from "packages/stream/src/lib.js";
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This PR addresses these issues.

fix(packages/stream): no initializers in ambient contexts
fix(packages/fetch): only export what's needed so TS doesn't mess up the imports in the output files
@jacob-ebey
Copy link
Contributor Author

@Gozala, hoping to get this merged.

@jacob-ebey
Copy link
Contributor Author

If you are looking for another maintainer I'd be happy happy to help BTW.

@Gozala Gozala merged commit 30ad037 into web-std:main Apr 13, 2022
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

Successfully merging this pull request may close these issues.

2 participants