animated-scroll-to
Advanced tools
Comparing version 2.0.3 to 2.0.4
declare type TCoords = [number | null, number | null]; | ||
interface IUserOptions { | ||
interface IOptions { | ||
cancelOnUserAction?: boolean; | ||
@@ -13,5 +13,5 @@ easing?: (t: number) => number; | ||
} | ||
declare function animateScrollTo(y: number, userOptions?: IUserOptions): any; | ||
declare function animateScrollTo(coords: TCoords, userOptions?: IUserOptions): any; | ||
declare function animateScrollTo(scrollToElement: Element, userOptions?: IUserOptions): any; | ||
declare function animateScrollTo(y: number, userOptions?: IOptions): any; | ||
declare function animateScrollTo(coords: TCoords, userOptions?: IOptions): any; | ||
declare function animateScrollTo(scrollToElement: Element, userOptions?: IOptions): any; | ||
export default animateScrollTo; |
{ | ||
"name": "animated-scroll-to", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Simple, plain JavaScript animated window scroll", | ||
@@ -5,0 +5,0 @@ "main": "./lib/animated-scroll-to.js", |
type TCoords = [number | null, number | null]; | ||
interface IUserOptions { | ||
interface IOptions { | ||
cancelOnUserAction?: boolean | ||
@@ -15,13 +15,2 @@ easing?: (t:number) => number | ||
interface IOptions { | ||
cancelOnUserAction: boolean | ||
easing: (t:number) => number | ||
elementToScroll: Element | Window | ||
horizontalOffset: number | ||
maxDuration: number | ||
minDuration: number | ||
speed: number | ||
verticalOffset: number | ||
} | ||
// --------- SCROLL INTERFACES | ||
@@ -148,8 +137,8 @@ | ||
function animateScrollTo(y:number, userOptions?:IUserOptions); | ||
function animateScrollTo(coords:TCoords, userOptions?:IUserOptions); | ||
function animateScrollTo(scrollToElement: Element, userOptions?:IUserOptions); | ||
function animateScrollTo(y:number, userOptions?:IOptions); | ||
function animateScrollTo(coords:TCoords, userOptions?:IOptions); | ||
function animateScrollTo(scrollToElement: Element, userOptions?:IOptions); | ||
function animateScrollTo( | ||
numberOrCoordsOrElement: number | TCoords | Element, | ||
userOptions: IUserOptions = {} | ||
userOptions: IOptions = {} | ||
) { | ||
@@ -156,0 +145,0 @@ // Check for server rendering |
@@ -12,6 +12,2 @@ { | ||
}, | ||
// "lib": [ | ||
// "ES2015", | ||
// "dom" | ||
// ], | ||
"include": [ | ||
@@ -18,0 +14,0 @@ "src/**/*" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53263
12
590