All files / core/lib Sentry.ts

100% Statements 13/13
100% Branches 0/0
100% Functions 5/5
100% Lines 12/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 232x         2x 1x     2x 1x 1x     2x 1x     2x 8x 8x 2x  
import { Client } from './Client';
import { IOptions } from './Options';
 
let sharedClient: Client;
 
export function create(dsn: string, options?: IOptions) {
  return setSharedClient(new Client(dsn, options));
}
 
export function setSharedClient(client: Client) {
  sharedClient = client;
  return client;
}
 
export function getSharedClient() {
  return sharedClient;
}
 
export class SentryError implements Error {
  public name = 'SentryError';
  constructor(public message: string) {}
}