Comments (4)
Yes, it is fixed!Thank you @joshuap
from honeybadger-react.
I have an issue with @honeybadger-io/react and typescript in one of projects.
An error while passing a honeybadger
Client type into <ErrorBoundary>
component, it expects HoneyBadger
Temporary workaround I've implemented:
import ErrorBoundary from '@honeybadger-io/react';
import React from 'react';
import honeybadger from '../lib/honeybadger';
import type Honeybadger from '@honeybadger-io/js';
const App = (): JSX.Element => {
return (
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
<ErrorBoundary honeybadger={honeybadger as Honeybadger}>
<>
<Component>
</>
</ErrorBoundary>
);
};
Full error text:
No overload matches this call.
Overload 1 of 2, '(props: Props | Readonly<Props>): ErrorBoundary', gave the following error.
Type 'Client' is not assignable to type 'Honeybadger'.
Type 'Client' is missing the following properties from type 'Honeybadger': errorHandler, requestHandler, lambdaHandler
Overload 2 of 2, '(props: Props, context: any): ErrorBoundary', gave the following error.
Type 'Client' is not assignable to type 'Honeybadger'.
Type 'Client' is not assignable to type 'Honeybadger'.ts(2769)
from honeybadger-react.
Hey @JustFly1984 , can you please try installing branch and let us know if you still experience the issue?
npm command to install a specific branch:
npm install@honeybadger-io/react#fix-ts-definitions --save
Thanks!
from honeybadger-react.
@JustFly1984 this should now be fixed in @honeybadger-io/[email protected]
from honeybadger-react.
Related Issues (20)
- Setup config and add context HOT 2
- Beta version honeybadger-js HOT 1
- Double notification HOT 3
- Fix documentation site HOT 3
- Bump peerDependencies version HOT 1
- @honeybadger-io/react does not contain a default export as described in the docs HOT 2
- Custom context values in error object discarded by react error handler
- Missing sourcemaps or a misconfigured package with Create React App - CRA HOT 9
- Enforce Conventional Commits HOT 1
- Outdated version of @honeybadger-io/js 3.2.8 => 4.0.2 HOT 8
- Shipjs Integration
- Shipjs Integration
- react@18 support HOT 2
- Make `@honeybadger-io/js` a peer dependency HOT 2
- Integrating our projects? HOT 4
- ErrorComponent prop on HoneyBadgerErrorBoundary wasn't mentioned anywhere in docs
- New release? HOT 5
- Upgrade to Babel 7
- TypeScript types are not included in npm package HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeybadger-react.