question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Types for 7.7 conflict with redux

See original GitHub issue

Describe the bug Typings for before v9.3.1 throw in typescript (affecting react-sortable-tree and react-sortable-tree-theme-file-explorer)

In 7.7 you included in interfaces.ts

import { Unsubscribe } from 'redux';

export type Unsubscribe = () => void;

while this was valid back then it now throws with typescript@next

Steps to reproduce the behavior:

  1. Clone DefinitelyTyped repo
  2. npm install
  3. npm run test react-sortable-tree
  4. See error

Expected behavior No type error

Additional context This particular problematic redeclaration is gone in v9. I would appreciate it if you could backport #1459 to v7 (remove the import from redux)

https://travis-ci.org/DefinitelyTyped/DefinitelyTyped/builds/591852078?utm_source=github_status&utm_medium=notification

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
lstkzcommented, Oct 26, 2019

I have the same problem. Adding declare module 'redux'; to default.d.ts fixed the problem. This is a good workaround if you don’t use redux.

0reactions
eps1loncommented, Apr 28, 2022

No longer reproduces.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage With TypeScript - Redux
React Redux has its type definitions in a separate @types/react-redux typedefs package on NPM. In addition to typing the library functions, ...
Read more >
Why is VS Code importing from "hoist-non-react-statics ...
It seems to be an issue with the @types relating to react. I filed an issue on the react-redux github repo. yarn upgrade...
Read more >
Up & Running with React, Redux Toolkit, Typescript and ...
In this article, we will learn how to use React, Typescript and Redux Toolkit together. The goal is to build a basic CRUD...
Read more >
React Redux-Toolkit Shopping Cart App - YouTube
React Redux -Toolkit Shopping Cart App | Redux -Persist with Redux -Toolkit. 7.7 K views 8 months ago ... 7.7 K views 8...
Read more >
PTX ISA :: CUDA Toolkit Documentation
Directive keywords begin with a dot, so no conflict is possible with ... redux.sync.op.type dst, src, membermask; .op = {.add, .min, .max} .type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found