rollbar / rollbar-react

React features to enhance using Rollbar.js in React Applications
https://docs.rollbar.com/docs/react
MIT License
42 stars 10 forks source link

Typescript Types not available in npm package #31

Closed ChromeQ closed 2 years ago

ChromeQ commented 2 years ago

Looks like some types were included in v0.9.0 but when I install via npm install @rollbar/react then the correct version is installed but types are still missing.

I think the index.d.ts is not included in the package: image

So the types are not available in the code:

error TS7016: Could not find a declaration file for module '@rollbar/react'. '.../node_modules/@rollbar/react/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/rollbar__react` if it exists or add a new declaration (.d.ts) file containing `declare module '@rollbar/react';`

8 import { Provider as RollbarProvider, ErrorBoundary as RollbarErrorBoundary } from '@rollbar/react';
ChromeQ commented 2 years ago

Thanks for fixing this @waltjones , will there be another release soon as latest version is still 0.9.0?

waltjones commented 2 years ago

This is now published in v0.10.0. https://github.com/rollbar/rollbar-react/releases/tag/v0.10.0