Created
June 27, 2018 18:55
-
-
Save MattiasBuelens/196871111c02a27b102239b7c5b449e3 to your computer and use it in GitHub Desktop.
Workaround for WHATWG streams in TypeScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ReadableStream as WhatWGReadableStream, | |
TransformStream as WhatWGTransformStream, | |
WritableStream as WhatWGWritableStream | |
} from 'whatwg-streams'; | |
export type ReadableStream<R> = WhatWGReadableStream<R>; | |
export const ReadableStream: typeof WhatWGReadableStream = (self as any).ReadableStream; | |
export type WritableStream<W> = WhatWGWritableStream<W>; | |
export const WritableStream: typeof WhatWGWritableStream = (self as any).WritableStream; | |
export type TransformStream<R, W> = WhatWGTransformStream<R, W>; | |
export const TransformStream: typeof WhatWGTransformStream = (self as any).TransformStream; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment