Created
February 20, 2016 22:21
-
-
Save piperswe/9fa3980a87de4d71268a to your computer and use it in GitHub Desktop.
This file contains 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
>tsc | |
sbuffers.d.ts(22,16): error TS2435: Ambient modules cannot be nested in other modules or namespaces. |
This file contains 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 { Readable, Writable } from 'stream' | |
declare module StreamBuffers { | |
export interface StreamBuffers { | |
ReadableStreamBuffer: ReadableStreamBufferFactory | |
WritableStreamBuffer: WritableStreamBuffer | |
} | |
interface ReadableStreamBufferFactory { | |
new (options: Options): Readable | |
} | |
interface WritableStreamBuffer { | |
new (options: Options): Writable | |
} | |
interface Options { | |
frequency: number | |
chunkSize: number | |
} | |
} | |
declare module 'stream-buffers' { | |
var streamBuffers: StreamBuffers.StreamBuffers | |
export = streamBuffers | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment