import { SubscriptionCallback , SubscriptionHandler , } from '@aragon/connect-types' ; export function subscription < T , U = SubscriptionCallback < T > > ( callback , createSubscription ) { return callback ? createSubscription ( callback ) : ( callback ) => createSubscription ( callback ) ; }