prettier import { TeardownLogic } from 'rxjs' ; export function getRegisteredTeardowns ( subscription ) { if ( '_teardowns' in subscription ) { return subscription . _teardowns ?? [ ] ; } else { throw new TypeError ( 'Invalid Subscription' ) ; } }