Skip to content

Commit 8bac22e

Browse files
committed
Added example how better provide typings by adding jsDoc
1 parent 95a478a commit 8bac22e

5 files changed

Lines changed: 4499 additions & 334 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
src/tsdoc-metadata.json
33
typings/
4+
*.log

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"typings": "src/react-native-feather.d.ts",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
9-
"prepublish": "tsc -p tsconfig.json && api-extractor run --local && rimraf typings"
9+
"prepublish": "tsc -p tsconfig.json && npx api-extractor run --local && rimraf typings"
1010
},
1111
"repository": {
1212
"type": "git",
@@ -33,6 +33,9 @@
3333
"react-native-svg": ">=5.3"
3434
},
3535
"devDependencies": {
36+
"@types/react": "^17.0.11",
37+
"react-native": "^0.64.2",
38+
"react-native-svg": "^12.1.1",
3639
"rimraf": "^3.0.2",
3740
"typescript": "^4.3.4"
3841
}

src/icons/Activity.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import * as React from "react";
2-
import Svg, { Path } from "react-native-svg";
2+
import Svg, { Path, SvgProps } from "react-native-svg";
33

4+
/**
5+
* @param {SvgProps} props
6+
* @returns
7+
*/
48
function SvgActivity(props) {
59
return (
610
<Svg

0 commit comments

Comments
 (0)