diff --git a/type-definitions/most.d.ts b/type-definitions/most.d.ts index 68f4ee82..06b159e2 100644 --- a/type-definitions/most.d.ts +++ b/type-definitions/most.d.ts @@ -74,16 +74,13 @@ export interface Stream extends Source { ap(fs: Stream<(a: A) => B>): Stream; - // Note: Without higher-kinded types, the types for these - // cannot be written in a completely safe manner; See https://github.com/Microsoft/TypeScript/issues/1290 - // For better type safety, consider using most.join/switch/switchLatest with thru - join(): A; - switch(): A; - switchLatest(): A; + join(this: Stream>): Stream; + switch(this: Stream>): Stream; + switchLatest(this: Stream>): Stream; continueWith(f: (a: any) => Stream): Stream; concatMap(f: (a: A) => Stream): Stream; - mergeConcurrently(concurrency: number): Stream; + mergeConcurrently(this: Stream>, concurrency: number): Stream; merge(...ss: Array>): Stream; mergeArray(streams: Array>): Stream;