Skip to content

Commit b02ca05

Browse files
authored
Merge pull request #160 from dubalol/typescript-declaration-file
Types declaration file and package.json update
2 parents 0935511 + 6d496ab commit b02ca05

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

package/index.d.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Type definitions for reactime v3.1
2+
// Project: <https://github.com/open-source-labs/reactime>
3+
// Definitions by: Abaas Khorrami <https://github.com/dubalol>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
/**
7+
* The 'reactime' module has one export:
8+
* --> the async @function returned from linkFiber.js
9+
* @param {container} --> the div element corresponding to your root container
10+
* @returns {void} --> no return value
11+
*
12+
* Reactime contributors:
13+
* Abaas Khorrami
14+
* Andy Wond
15+
* Bryan Lee
16+
* Chris Flannery
17+
* David Chai
18+
* Ergi Shehu
19+
* Joshua Howard
20+
* Josh Kim
21+
* Prasanna Malla
22+
* Rajeeb Banstola
23+
* Rocky Lin
24+
* Ruth Anam
25+
* Ryan Dang
26+
* Sierra Swaby
27+
* Yujin Kang
28+
*
29+
*
30+
* NOTE: TypeScript support is in beta and still experimental.
31+
*
32+
*/
33+
34+
declare module "reactime" {
35+
function linkFiber(
36+
container: HTMLElement,
37+
): void;
38+
export = linkFiber;
39+
}

package/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"scripts": {
1111
"test": "echo \"Error: no test specified\""
1212
},
13+
"types": "./index.d.ts",
1314
"peerDependencies": {
1415
"react": "~16.0.0",
1516
"react-dom": "~16.0.0"

0 commit comments

Comments
 (0)