Skip to content

Commit 70cf8ba

Browse files
authored
refactor: define type on top level (#7285)
1 parent 456e185 commit 70cf8ba

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/_internal/scrollbar/src/Scrollbar.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ import { rtlInset, useReactivated, Wrapper } from '../../../_utils'
2626
import { scrollbarLight } from '../styles'
2727
import style from './styles/index.cssr'
2828

29+
interface MergedScrollOptions {
30+
left?: number
31+
top?: number
32+
el?: HTMLElement
33+
position?: 'top' | 'bottom'
34+
behavior?: ScrollBehavior
35+
debounce?: boolean
36+
index?: number
37+
elSize?: number
38+
}
39+
2940
export interface ScrollTo {
3041
(x: number, y: number): void
3142
(options: {
@@ -360,16 +371,6 @@ const Scrollbar = defineComponent({
360371
onResize(e)
361372
sync()
362373
}
363-
interface MergedScrollOptions {
364-
left?: number
365-
top?: number
366-
el?: HTMLElement
367-
position?: 'top' | 'bottom'
368-
behavior?: ScrollBehavior
369-
debounce?: boolean
370-
index?: number
371-
elSize?: number
372-
}
373374
const scrollBy: ScrollBy = (
374375
options: ScrollOptions | number,
375376
y?: number

0 commit comments

Comments
 (0)