added types for motion-scroll (#35395)

This commit is contained in:
ninjabonsai
2019-05-14 11:00:09 -07:00
committed by Nathan Shively-Sanders
parent 2dec5141f6
commit 0b795f1149
4 changed files with 39 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// Type definitions for motion-scroll 1.0
// Project: https://github.com/ninjabonsai/motion-scroll#readme
// Definitions by: Richard Rogers <https://github.com/ninjabonsai>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace MotionScroll;
export function scroll(config: {
element?: HTMLElement;
axis?: "x" | "y";
scrollTo?: number;
speed?: number;
easing?: () => void;
callBack?: () => void;
delay?: number;
force?: boolean;
minScrollTime?: number;
maxScrollTime?: number;
}): void;
@@ -0,0 +1,3 @@
import MotionScroll = require("motion-scroll");
MotionScroll.scroll({});
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6", "dom"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "motion-scroll-tests.ts"]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }