export type Subscription = (cb: (val: T) => void) => () => void;