import { getCurrentHub } from '../hub' ; import { Client , Options } from '../types' ; import { logger } from '../utils' ; export type ClientClass < F extends Client , O extends Options > = new ( options ) => F ; export function initAndBind < F extends Client , O extends Options > ( clientClass , options ) { if ( options . isDebug === true ) { logger . enable ( ) ; } const hub = getCurrentHub ( ) ; const client = new clientClass ( options ) ; hub . bindClient ( client ) ; }