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

fix: typescript types #56

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"dependencies": {
"@web-std/blob": "^3.0.3",
"@web-std/form-data": "^3.0.2",
"@web-std/stream": "^1.0.1",
"data-uri-to-buffer": "^3.0.1",
"mrmime": "^1.0.0",
"@web3-storage/multipart-parser": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/fetch/src/package.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const { FormData, Blob } = globalThis
export * from "@web-std/stream"
export { ReadableStream } from "@web-std/stream"


52 changes: 35 additions & 17 deletions packages/stream/src/lib.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
export const {
ReadableStream,
ReadableStreamDefaultReader,
declare var ReadableStreamExport: typeof ReadableStream;
declare var ReadableStreamDefaultReaderExport: typeof ReadableStreamDefaultReader;
// @ts-ignore
declare var ReadableStreamBYOBReaderExport: typeof ReadableStreamBYOBReader;
// @ts-ignore
declare var ReadableStreamBYOBRequestExport: typeof ReadableStreamBYOBRequest;
// @ts-ignore
declare var ReadableByteStreamControllerExport: typeof ReadableByteStreamController;
declare var ReadableStreamDefaultControllerExport: typeof ReadableStreamDefaultController;
declare var TransformStreamExport: typeof TransformStream;
declare var TransformStreamDefaultControllerExport: typeof TransformStreamDefaultController;
declare var WritableStreamExport: typeof WritableStream;
declare var WritableStreamDefaultWriterExport: typeof WritableStreamDefaultWriter;
declare var WritableStreamDefaultControllerExport: typeof WritableStreamDefaultController;
declare var ByteLengthQueuingStrategyExport: typeof ByteLengthQueuingStrategy;
declare var CountQueuingStrategyExport: typeof CountQueuingStrategy;
declare var TextEncoderStreamExport: typeof TextEncoderStream;
declare var TextDecoderStreamExport: typeof TextDecoderStream;

ReadableStreamBYOBReader,
ReadableStreamBYOBRequest,
ReadableByteStreamController,
ReadableStreamDefaultController,
TransformStream,
TransformStreamDefaultController,
WritableStream,
WritableStreamDefaultWriter,
WritableStreamDefaultController,
ByteLengthQueuingStrategy,
CountQueuingStrategy,
TextEncoderStream,
TextDecoderStream,
} = globalThis
export {
ReadableStreamExport as ReadableStream,
ReadableStreamDefaultReaderExport as ReadableStreamDefaultReader,
ReadableStreamBYOBReaderExport as ReadableStreamBYOBReader,
ReadableStreamBYOBRequestExport as ReadableStreamBYOBRequest,
ReadableByteStreamControllerExport as ReadableByteStreamController,
ReadableStreamDefaultControllerExport as ReadableStreamDefaultController,
TransformStreamExport as TransformStream,
TransformStreamDefaultControllerExport as TransformStreamDefaultController,
WritableStreamExport as WritableStream,
WritableStreamDefaultWriterExport as WritableStreamDefaultWriter,
WritableStreamDefaultControllerExport as WritableStreamDefaultController,
ByteLengthQueuingStrategyExport as ByteLengthQueuingStrategy,
CountQueuingStrategyExport as CountQueuingStrategy,
TextEncoderStreamExport as TextEncoderStream,
TextDecoderStreamExport as TextDecoderStream,
};