Fix prethen value

This commit is contained in:
Paul Grau 2021-07-18 15:07:16 +09:00
parent b0cce82e74
commit 5617d0f591

3
lib/index.d.ts vendored
View file

@ -13,7 +13,7 @@ interface CancelablePromise<T> extends Promise<T> {
interface OrderPromise<C, T> extends CancelablePromise<T> { interface OrderPromise<C, T> extends CancelablePromise<T> {
channel: C; channel: C;
prethen(onFulfilled: (value: C) => void): void; prethen(onFulfilled: (value: T) => void): void;
} }
type UnwrapOrderPromise<A> = A extends OrderPromise<any, infer T> ? T : never type UnwrapOrderPromise<A> = A extends OrderPromise<any, infer T> ? T : never
@ -45,7 +45,6 @@ export interface WriteChannel<T> {
export type ReadWriteChannel<T> = ReadChannel<T> & WriteChannel<T>; export type ReadWriteChannel<T> = ReadChannel<T> & WriteChannel<T>;
import { Functionalify, Typify } from './functional'; import { Functionalify, Typify } from './functional';
// Ideally these would not be channels of `any`, but I couldn't find a way to pass on the generic arguments // Ideally these would not be channels of `any`, but I couldn't find a way to pass on the generic arguments
type FunctionalInterface = type FunctionalInterface =