This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree 2 files changed +31
-2
lines changed
2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ <a name =" 0.3.0 " ></a >
2
+ # [ 0.3.0] ( https://github.com/knisterpeter/react-to-typescript-definitions/compare/v0.2.1...v0.3.0 ) (2015-12-10)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * ** CHANGELOG:** Fixed changelog urls ([ 5aa784d] ( https://github.com/knisterpeter/react-to-typescript-definitions/commit/5aa784d ) )
8
+
9
+ ### Features
10
+
11
+ * ** types:** Added explicit any type ([ d06dc20] ( https://github.com/knisterpeter/react-to-typescript-definitions/commit/d06dc20 ) )
12
+ * ** types:** Added more optional types ([ 5ab5736] ( https://github.com/knisterpeter/react-to-typescript-definitions/commit/5ab5736 ) )
13
+ * Implemented pipes ([ 2c4b42a] ( https://github.com/knisterpeter/react-to-typescript-definitions/commit/2c4b42a ) )
14
+
15
+
16
+
1
17
<a name =" 0.2.1 " ></a >
2
18
## [ 0.2.1] ( https://github.com/knisterpeter/react-to-typescript-definitions/compare/v0.2.0...v0.2.1 ) (2015-12-02)
3
19
Original file line number Diff line number Diff line change @@ -17,13 +17,26 @@ Install as npm package:
17
17
``` sh
18
18
npm install react-to-typescript-definitions --save-dev
19
19
```
20
+ or
21
+ ``` sh
22
+ npm install -g react-to-typescript-definitions
23
+ ```
24
+
25
+
26
+ ## CLI
27
+
28
+ ``` sh
29
+ cat < some/react/component.jsx> | react2dts --name module-name
30
+ ```
20
31
21
32
## API
22
33
23
34
``` js
24
35
import * as react2dts from ' react-to-typescript-definitions' ;
25
36
26
- // react2dts.generate ('<module-name>', '<path/to/react-component>');
27
- react2dts .generate (' component' , path .join (__dirname , ' component.jsx' ));
37
+ // react2dts.generateFromFile ('<module-name>', '<path/to/react-component>');
38
+ react2dts .generateFromFile (' component' , path .join (__dirname , ' component.jsx' ));
28
39
40
+ // react2dts.generate('<module-name>', '<code of the component>');
41
+ react2dts .generate (' component' , ' component-code' );
29
42
```
You can’t perform that action at this time.
0 commit comments