Skip to content

Commit 53c59cd

Browse files
committed
Fix/Upgrade typescript typing, loosen peer dependencies
* change typescript typing * loosen peer dependencies * add optional @type/react dependency
1 parent f840312 commit 53c59cd

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-immutable-pure-component",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "React PureComponent implementation embracing Immutable.js",
55
"main": "lib/react-immutable-pure-component.js",
66
"module": "lib/react-immutable-pure-component.es.js",
@@ -44,8 +44,11 @@
4444
"rollup-plugin-babel": "2.7.1"
4545
},
4646
"peerDependencies": {
47-
"immutable": "^3 || ^4 || ^4.0.0-rc.0",
48-
"react": "^15 || ^16",
49-
"react-dom": "^15 || ^16"
47+
"immutable": ">= 3",
48+
"react": ">= 15",
49+
"react-dom": ">= 15"
50+
},
51+
"optionalDependencies": {
52+
"@types/react": "*"
5053
}
5154
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from 'react';
2-
declare module 'react-immutable-pure-component' {
3-
export class ImmutablePureComponent<P,S> extends React.Component<P,S> {
1+
export as namespace ImmutablePureComponent;
2+
3+
import { Component } from 'react';
4+
5+
export class ImmutablePureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> {
46
updateOnProps: Array<keyof P>;
57
updateOnStates: Array<keyof S>;
6-
shouldComponentUpdate(nextProps: P, nextState?: S): boolean;
7-
}
88
}

0 commit comments

Comments
 (0)