Skip to content

Commit c33c139

Browse files
forabistipsan
authored andcommitted
Fix TypeScript definition file issues (#74)
* Update package.json * Update typings.d.ts * Update typings.d.ts * Update typings.d.ts
1 parent 2745d84 commit c33c139

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.4",
44
"description": "Element.scrollIntoViewIfNeeded ponyfill that can animate the scrolling",
55
"main": "dist/bundle.js",
6+
"typings": "typings.d.ts",
67
"scripts": {
78
"test": "echo \"Error: no test specified\" && exit 1",
89
"build": "rollup src/index.js --format cjs -c --output dist/bundle.js && rollup test/index.js -c -f umd --output test/bundle.js",

typings.d.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module 'scroll-into-view-if-needed' {
1+
declare module 'scroll-into-view-if-needed' {
22
interface ScrollIntoViewIfNeededOptions {
33
centerIfNeeded: boolean;
44
duration: number;
@@ -8,14 +8,10 @@ module 'scroll-into-view-if-needed' {
88
interface ScrollIntoViewIfNeededFunction {
99
(
1010
node: Element,
11-
centerIfNeeded: boolean = false,
12-
options: ScrollIntoViewIfNeededOptions = {
13-
centerIfNeeded: false,
14-
duration: 0,
15-
easing: 'ease',
16-
}
11+
centerIfNeeded: boolean,
12+
options?: ScrollIntoViewIfNeededOptions,
1713
): void;
1814
}
1915
const ScrollIntoViewIfNeeded: ScrollIntoViewIfNeededFunction;
20-
export default ScrollIntoViewIfNeeded;
16+
export = ScrollIntoViewIfNeeded;
2117
}

0 commit comments

Comments
 (0)