Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types networking error (TypeScript) #1491

Open
vladyslav-honchenko opened this issue Jul 19, 2024 · 2 comments
Open

Types networking error (TypeScript) #1491

vladyslav-honchenko opened this issue Jul 19, 2024 · 2 comments

Comments

@vladyslav-honchenko
Copy link

Describe the bug

We have an incorrect type in networking method:

import Reactotron, { networking } from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';

const reactotron = Reactotron.configure({ name: 'My App' })
  .useReactNative()
  .use(reactotronRedux())
  .use(networking()) <-------here
  .connect();

export default reactotron;

Error

Argument of type '(reactotron: ReactotronCore) => { onConnect: () => void; }' is not assignable to parameter of type 'PluginCreator<ReactotronReactNative & { createEnhancer: (skipSettingStore?: boolean | undefined) => (createStore: any) => (reducer: any, ...args: any[]) => any; setReduxStore: (store: any) => void; reportReduxAction: (action: { ...; }, ms: number, important?: boolean | undefined) => void; }>'. Types of parameters 'reactotron' and 'client' are incompatible. Type 'ReactotronReactNative & { createEnhancer: (skipSettingStore?: boolean | undefined) => (createStore: any) => (reducer: any, ...args: any[]) => any; setReduxStore: (store: any) => void; reportReduxAction: (action: { ...; }, ms: number, important?: boolean | undefined) => void; }' is not assignable to type 'ReactotronCore'. Types of property 'options' are incompatible. Type 'ClientOptions<ReactotronReactNative & { createEnhancer: (skipSettingStore?: boolean | undefined) => (createStore: any) => (reducer: any, ...args: any[]) => any; setReduxStore: (store: any) => void; reportReduxAction: (action: { ...; }, ms: number, important?: boolean | undefined) => void; }>' is not assignable to type 'ClientOptions<ReactotronCore>'.Type 'ReactotronCore' is not assignable to type 'ReactotronReactNative & { createEnhancer: (skipSettingStore?: boolean | undefined) => (createStore: any) => (reducer: any, ...args: any[]) => any; setReduxStore: (store: any) => void; reportReduxAction: (action: { ...; }, ms: number, important?: boolean | undefined) => void; }'. Type 'ReactotronCore' is missing the following properties from type 'ReactotronReactNative': useReactNative, setAsyncStorageHandler, log, logImportant, and 15 more.ts(2345)

Reactotron version

5.1.7

@gfirmill
Copy link

gfirmill commented Sep 10, 2024

I am getting this as well. Have you found a workaround?

@Qwin
Copy link

Qwin commented Sep 12, 2024

same issue with these 3 plugins:
.use(asyncStorage())
.use(networking())
.use(trackGlobalErrors())

used for now this to not type check them:
const { networking, asyncStorage, trackGlobalErrors } = require('reactotron-react-native')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants