From 0b795f1149b2d0769840876f5f09b9eda98288ff Mon Sep 17 00:00:00 2001 From: ninjabonsai Date: Tue, 14 May 2019 20:00:09 +0200 Subject: [PATCH] added types for motion-scroll (#35395) --- types/motion-scroll/index.d.ts | 19 +++++++++++++++++++ types/motion-scroll/motion-scroll-tests.ts | 3 +++ types/motion-scroll/tsconfig.json | 16 ++++++++++++++++ types/motion-scroll/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/motion-scroll/index.d.ts create mode 100644 types/motion-scroll/motion-scroll-tests.ts create mode 100644 types/motion-scroll/tsconfig.json create mode 100644 types/motion-scroll/tslint.json 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" }