import { Stream } from 'most';

export function nth<T>(index: number): (stream: Stream<T>) => Promise<T | undefined>;
export function first<T>(stream: Stream<T>): Promise<T | undefined>;
export function last<T>(stream: Stream<T>): Promise<T | undefined>;

import { Stream } from 'most';

export function nth<T>(index: number): (stream: Stream<T>) => Promise<T>;
export function first<T>(stream: Stream<T>): Promise<T>;
export function last<T>(stream: Stream<T>): Promise<T>;

--- 
+++ 
@@ -1,5 +1,5 @@
 import { Stream } from 'most';
 
-export function nth<T>(index: number): (stream: Stream<T>) => Promise<T>;
-export function first<T>(stream: Stream<T>): Promise<T>;
-export function last<T>(stream: Stream<T>): Promise<T>;
+export function nth<T>(index: number): (stream: Stream<T>) => Promise<T | undefined>;
+export function first<T>(stream: Stream<T>): Promise<T | undefined>;
+export function last<T>(stream: Stream<T>): Promise<T | undefined>;
Fix the resolve type of most-nth functions