Skip to content

Commit dce910b

Browse files
committed
Add typescript type definition
1 parent 312dcfd commit dce910b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"name": "react-immutable-pure-component",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "React PureComponent implementation embracing Immutable.js",
55
"main": "lib/react-immutable-pure-component.js",
6+
"types": "types/react-immutable-pure-component.d.ts",
7+
"files": [
8+
"lib",
9+
"types"
10+
],
611
"scripts": {
712
"build": "rollup -c",
813
"example": "babel example/index.js --out-file example/example.js",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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> {
4+
updateOnProps: string[];
5+
updateOnStates: string[];
6+
shouldComponentUpdate(nextProps: any, nextState?: {}): boolean;
7+
}
8+
}

0 commit comments

Comments
 (0)