Skip to content

Commit 7b60e22

Browse files
committed
export all Session functions from hub index, remove unnecessary Session cast
1 parent 3967cf9 commit 7b60e22

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/core/test/lib/base.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Hub, Scope } from '@sentry/hub';
2-
import { makeSession } from '@sentry/hub/src/session';
1+
import { Hub, Scope, makeSession } from '@sentry/hub';
32
import { Event, Span } from '@sentry/types';
43
import { dsnToString, logger, SentryError, SyncPromise } from '@sentry/utils';
54

packages/hub/src/hub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ export class Hub implements HubInterface {
427427

428428
if (scope) {
429429
// End existing session if there's one
430-
const currentSession = scope.getSession && (scope.getSession() as Session);
430+
const currentSession = scope.getSession && scope.getSession();
431431
if (currentSession && currentSession.status === 'ok') {
432432
updateSession(currentSession, { status: 'exited' });
433433
}

packages/hub/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type { Carrier, Layer } from './hub';
22

33
export { addGlobalEventProcessor, Scope } from './scope';
4-
export { updateSession, closeSession } from './session';
4+
export { closeSession, makeSession, updateSession } from './session';
55
export { SessionFlusher } from './sessionflusher';
66
export { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub';
77
export {

0 commit comments

Comments
 (0)