@@ -44,8 +44,8 @@ declare module 'swup' {
4444 }
4545
4646 export interface HookDefinitions {
47- 'scroll:start' : { } ;
48- 'scroll:end' : { } ;
47+ 'scroll:start' : undefined ;
48+ 'scroll:end' : undefined ;
4949 }
5050}
5151
@@ -94,9 +94,9 @@ export default class SwupScrollPlugin extends Plugin {
9494
9595 // Initialize Scrl lib for smooth animations
9696 this . scrl = new Scrl ( {
97- onStart : ( ) => swup . hooks . callSync ( 'scroll:start' ) ,
98- onEnd : ( ) => swup . hooks . callSync ( 'scroll:end' ) ,
99- onCancel : ( ) => swup . hooks . callSync ( 'scroll:end' ) ,
97+ onStart : ( ) => swup . hooks . callSync ( 'scroll:start' , undefined ) ,
98+ onEnd : ( ) => swup . hooks . callSync ( 'scroll:end' , undefined ) ,
99+ onCancel : ( ) => swup . hooks . callSync ( 'scroll:end' , undefined ) ,
100100 friction : this . options . scrollFriction ,
101101 acceleration : this . options . scrollAcceleration
102102 } ) ;
@@ -106,9 +106,9 @@ export default class SwupScrollPlugin extends Plugin {
106106 if ( animate ) {
107107 this . scrl . scrollTo ( offset ) ;
108108 } else {
109- swup . hooks . callSync ( 'scroll:start' ) ;
109+ swup . hooks . callSync ( 'scroll:start' , undefined ) ;
110110 window . scrollTo ( 0 , offset ) ;
111- swup . hooks . callSync ( 'scroll:end' ) ;
111+ swup . hooks . callSync ( 'scroll:end' , undefined ) ;
112112 }
113113 } ;
114114
0 commit comments