Types not available for react native
See original GitHub issueDo you want to request a feature or report a bug?
Bug / Feature… not sure
What is the current behavior?
I’ve installed pusher-js@5.0.3
and @types/pusher-js@4.2.2
I tried with just pusher-js, but didn’t get types. Based on this I almost didn’t open an issue here as I thought maybe typescript support wasn’t official. That being said I see work and issues around typescript so I decided to open this issue.
When using
import Pusher from 'pusher-js/react-native'
I get the following:
Could not find a declaration file for module 'pusher-js/react-native'. 'node_modules/pusher-js/react-native.js' implicitly has an 'any' type.
If the 'pusher-js' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pusher-js`
What is the expected behavior?
Types work when using plain javascript and react-native.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:18 (11 by maintainers)
Top Results From Across the Web
@types/react-native - npm
Start using @types/react-native in your project by running `npm i @types/react-native`. There are 463 other projects in the npm registry ...
Read more >Next.js is not recognizing '@types/react' - Stack Overflow
When I try to run my Next. js app with npm run dev I get an error message saying that I don't have...
Read more >Using TypeScript - React Native
TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. While React Native is built in Flow, it supports ......
Read more >Trouble with @types/react - Blog
Let's start with a TypeScript module for a React Native component. There is an error with the code, can you spot it? //...
Read more >Static Type Checking - React
Flow is a static type checker for your JavaScript code. It is developed at Facebook and is often used with React. It lets...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@leesio false alarm - just found it was a bug in my code. was importing
logger
from pusher for some reason 😅@leesio Thanks for releasing so quickly. That resolved the issue for me!