@@ -5,7 +5,9 @@ import type {
5
5
} from 'compute-scroll-into-view'
6
6
7
7
/** @public */
8
- export type Options < T > = StandardBehaviorOptions | CustomBehaviorOptions < T >
8
+ export type Options < T = unknown > =
9
+ | StandardBehaviorOptions
10
+ | CustomBehaviorOptions < T >
9
11
10
12
/** @public */
11
13
export interface StandardBehaviorOptions extends BaseOptions {
@@ -16,7 +18,7 @@ export interface StandardBehaviorOptions extends BaseOptions {
16
18
}
17
19
18
20
/** @public */
19
- export interface CustomBehaviorOptions < T > extends BaseOptions {
21
+ export interface CustomBehaviorOptions < T = unknown > extends BaseOptions {
20
22
behavior : CustomScrollBehaviorCallback < T >
21
23
}
22
24
@@ -30,7 +32,7 @@ let isStandardScrollBehavior = (
30
32
) : options is StandardBehaviorOptions =>
31
33
options === Object ( options ) && Object . keys ( options ) . length !== 0
32
34
33
- let isCustomScrollBehavior = < T > (
35
+ let isCustomScrollBehavior = < T = unknown > (
34
36
options : any
35
37
) : options is CustomBehaviorOptions < T > =>
36
38
typeof options === 'object' ? typeof options . behavior === 'function' : false
@@ -64,7 +66,7 @@ export default function scrollIntoView(
64
66
options ?: StandardBehaviorOptions | boolean
65
67
) : void
66
68
/** @public */
67
- export default function scrollIntoView < T > (
69
+ export default function scrollIntoView < T = unknown > (
68
70
target : Element ,
69
71
options ?: StandardBehaviorOptions | CustomBehaviorOptions < T > | boolean
70
72
) : T | void {
0 commit comments