From 0a4a5e1f26045b87d0d341b7c830054c934f240a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E7=94=9FPeA?= Date: Wed, 13 Feb 2019 22:15:04 +0800 Subject: [PATCH] update for moveto v1.8.0 --- types/moveto/index.d.ts | 7 ++++++- types/moveto/moveto-tests.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/moveto/index.d.ts b/types/moveto/index.d.ts index f9734ee184..729f70bd78 100644 --- a/types/moveto/index.d.ts +++ b/types/moveto/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for moveto 1.7 +// Type definitions for moveto 1.8 // Project: https://github.com/hsnaydd/moveTo // Definitions by: Rostislav Shermenyov +// pea3nut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class MoveTo { @@ -66,6 +67,10 @@ declare namespace MoveTo { * Ease function name */ easing?: string; + /** + * The container been computed and scrolled + */ + container?: Window | HTMLElement; /** * The function to be run after scrolling complete. Target passes as the first argument */ diff --git a/types/moveto/moveto-tests.ts b/types/moveto/moveto-tests.ts index 325cb57f3c..ea65854f25 100644 --- a/types/moveto/moveto-tests.ts +++ b/types/moveto/moveto-tests.ts @@ -2,6 +2,7 @@ const options: MoveTo.MoveToOptions = { tolerance: 70, duration: 300, easing: "easeOutQuart", + container: Math.random() > 0.5 ? window : document.createElement('div'), callback: () => {} };