mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
[react-infinite-scroller] fix TS2497 (#22247)
* [react-infinite-scroller] fix TS2497
I get this error when importing the module with `import * as InfiniteScroll from 'react-infinite-scroller`:
Error:(9, 33) TS2497: Module '".../@types/react-infinite-scroller/index"' resolves to a non-module entity and cannot be imported using this construct.
This PR fixes that error by merging the exported class with an empty namespace.
* revert accidental formatting change
This commit is contained in:
committed by
Mohamed Hegazy
parent
d858e8e4a6
commit
e2070bba6d
1
types/react-infinite-scroller/index.d.ts
vendored
1
types/react-infinite-scroller/index.d.ts
vendored
@@ -63,6 +63,7 @@ declare namespace InfiniteScroll {
|
||||
loader?: React.ReactElement<any>;
|
||||
}
|
||||
class InfiniteScroll extends React.Component<InfiniteScrollProps> { }
|
||||
namespace InfiniteScroll {}
|
||||
}
|
||||
|
||||
export = InfiniteScroll.InfiniteScroll;
|
||||
|
||||
Reference in New Issue
Block a user