Skip to content

Commit 3abfb2d

Browse files
feat(react): expose FallbackRender as top-level type (#5307)
This PR exposes the `FallbackRender` type at the root level of `@sentry/react` package. Currently, to use the type and so get type info on the passed error object., a project I work on does: ```ts import { FallbackRender } from '@sentry/react/types/errorboundary.d'; // v6: import { FallbackRender } from '@sentry/react/dist/errorboundary'; export const ErrorOverlay: FallbackRender = (error) => { /* component code */ }); ``` which feels wrong, as reaching into the package internals is clearly asking for unannounced breaking changes (as seen going from v6->v7). Signed-off-by: Matthew Peveler <[email protected]> Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent 982696f commit 3abfb2d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export * from '@sentry/browser';
22

33
export { init } from './sdk';
44
export { Profiler, withProfiler, useProfiler } from './profiler';
5+
export type { FallbackRender } from './errorboundary';
56
export { ErrorBoundary, withErrorBoundary } from './errorboundary';
67
export { createReduxEnhancer } from './redux';
78
export { reactRouterV3Instrumentation } from './reactrouterv3';

0 commit comments

Comments
 (0)