Skip to content

Commit 6f90c34

Browse files
Add type definition (#10)
* Add type definition * Make file prop optional
1 parent bcfe6e7 commit 6f90c34

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "Github Gist React component",
55
"main": "lib/index.js",
66
"module": "es/index.js",
7+
"types": "types",
78
"files": [
9+
"types/index.d.ts",
810
"lib",
911
"es"
1012
],

types/index.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { PureComponent } from "react";
2+
3+
export interface GistProps {
4+
id: string;
5+
file?: string;
6+
}
7+
8+
declare class Gist extends PureComponent<GistProps, any> {}
9+
10+
export default Gist;

0 commit comments

Comments
 (0)