diff --git a/types/motion-scroll/index.d.ts b/types/motion-scroll/index.d.ts new file mode 100644 index 0000000000..c3948bc326 --- /dev/null +++ b/types/motion-scroll/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for motion-scroll 1.0 +// Project: https://github.com/ninjabonsai/motion-scroll#readme +// Definitions by: Richard Rogers +// 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; diff --git a/types/motion-scroll/motion-scroll-tests.ts b/types/motion-scroll/motion-scroll-tests.ts new file mode 100644 index 0000000000..5e6566e2e5 --- /dev/null +++ b/types/motion-scroll/motion-scroll-tests.ts @@ -0,0 +1,3 @@ +import MotionScroll = require("motion-scroll"); + +MotionScroll.scroll({}); diff --git a/types/motion-scroll/tsconfig.json b/types/motion-scroll/tsconfig.json new file mode 100644 index 0000000000..75c862d782 --- /dev/null +++ b/types/motion-scroll/tsconfig.json @@ -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"] +} diff --git a/types/motion-scroll/tslint.json b/types/motion-scroll/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/motion-scroll/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }