-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathindex.ts
More file actions
34 lines (29 loc) · 1.14 KB
/
index.ts
File metadata and controls
34 lines (29 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// import/export got a false positive, and affects most of our index barrel files
// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703
/* eslint-disable import/export */
import type { TanStackMiddlewareBase } from '../common/types';
export * from '@sentry/react';
export { init } from './sdk';
/**
* No-op stub for client-side builds.
* The actual implementation is server-only, but this stub is needed to prevent build errors.
*/
export function wrapMiddlewaresWithSentry<T extends TanStackMiddlewareBase>(middlewares: Record<string, T>): T[] {
return Object.values(middlewares);
}
/**
* No-op stub for client-side builds.
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
*/
export const sentryGlobalRequestMiddleware: TanStackMiddlewareBase = {
'~types': undefined,
options: {},
};
/**
* No-op stub for client-side builds.
* The actual implementation is server-only, but this stub is needed to prevent rendering errors.
*/
export const sentryGlobalFunctionMiddleware: TanStackMiddlewareBase = {
'~types': undefined,
options: {},
};