import { eventFromException } from './eventbuilder' ; import { core , Event , EventHint , Options , Transport } from './shared' ; import { RequestTransport } from './transports' ; see MiniProgramFrontend export interface MiniProgramOptions extends Options { /**
     * request url
     */ url : string ; /**
     * Enables native crashHandling. This only works if `enableNative` is `true`.
     * Defaults to `true`.
     */ enableNativeCrashHandling ? : boolean ; /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */ shutdownTimeout ? : number ; /** Should the native nagger alert be shown or not. */ enableNativeNagger ? : boolean ; /** The interval to end a session if the App goes to the background. */ sessionTrackingIntervalMillis ? : number ; } export class MiniProgramBackend extends core . BaseBackend < Options > { options : MiniProgramOptions ; public constructor ( protected readonly _options ) { super ( _options ) ; this . options = _options ; } inheritDoc public eventFromException ( exception , hint ? ) { return eventFromException ( this . options , exception , hint ) ; } param event public sendEvent ( event ) { this . _transport . sendEvent ( event ) . then ( null , reason => { console . warn ( `Error while sending event: ${ reason }` ) ; } ) ; } inheritDoc protected _setupTransport ( ) { return new RequestTransport ( ) ; } }