import { Scope } from '@sentry/hub' ; import { Breadcrumb , User } from '@sentry/types' ; import { NATIVE } from './wrapper' ; /**
 * Extends the scope methods to set scope on the Native SDKs
 */ export class CordovaScope extends Scope { inheritDoc public setUser ( user ) { NATIVE . setUser ( user ) ; return super . setUser ( user ) ; } inheritDoc public setTag ( key , value ) { NATIVE . setTag ( key , value ) ; return super . setTag ( key , value ) ; } inheritDoc public setTags ( tags ) { Object . keys ( tags ) . forEach ( key => { NATIVE . setTag ( key , tags [ key ] ) ; } ) ; return super . setTags ( tags ) ; } inheritDoc public setExtras ( extras ) { Object . keys ( extras ) . forEach ( key => { NATIVE . setExtra ( key , extras [ key ] ) ; } ) ; return super . setExtras ( extras ) ; } inheritDoc public setExtra ( key , extra ) { NATIVE . setExtra ( key , extra ) ; return super . setExtra ( key , extra ) ; } inheritDoc public addBreadcrumb ( breadcrumb , maxBreadcrumbs ? ) { NATIVE . addBreadcrumb ( breadcrumb ) ; return super . addBreadcrumb ( breadcrumb , maxBreadcrumbs ) ; } inheritDoc public clearBreadcrumbs ( ) { NATIVE . clearBreadcrumbs ( ) ; return super . clearBreadcrumbs ( ) ; } inheritDoc public setContext ( key , context ) { NATIVE . setContext ( key , context ) ; return super . setContext ( key , context ) ; } }