Skip to content

Commit 2148b8a

Browse files
committed
Add typescript types
1 parent b14546c commit 2148b8a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Smooth scrolling onClick event handler
3+
* @param {string} selector argument will be passed to `querySelector`, usually an HTML id
4+
*/
5+
declare const scrollTo: (selector: string) => void;
6+
export default scrollTo;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
"@babel/core": "^7.6.0",
3333
"babel-preset-gatsby-package": "^0.2.4",
3434
"cross-env": "^5.2.1"
35-
}
35+
},
36+
"types": "index.d.ts"
3637
}

0 commit comments

Comments
 (0)