File tree 6 files changed +21
-7
lines changed
6 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ module.exports = {
3
3
functions : [
4
4
{
5
5
name : 'goTo' ,
6
- signature : '() => void' ,
6
+ signature : `(target: number | string | HTMLElement | Vue, options?: {
7
+ container?: string | HTMLElement | Vue
8
+ duration?: number
9
+ offset?: number
10
+ easing?: VuetifyGoToEasing
11
+ appOffset?: boolean
12
+ }): Promise<number>` ,
7
13
} ,
8
14
] ,
9
15
} ,
Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ module.exports = {
3
3
functions : [
4
4
{
5
5
name : 'goTo' ,
6
- signature : '(target: string | number | HTMLElement | VueComponent, options?: object): void' ,
6
+ signature : `(target: number | string | HTMLElement | Vue, options?: {
7
+ container?: string | HTMLElement | Vue
8
+ duration?: number
9
+ offset?: number
10
+ easing?: VuetifyGoToEasing
11
+ appOffset?: boolean
12
+ }): Promise<number>` ,
7
13
} ,
8
14
] ,
9
15
} ,
Original file line number Diff line number Diff line change 46
46
47
47
<template v-else-if =" header === ' type' || header === ' signature' " >
48
48
<div
49
- class =" text-mono"
49
+ class =" text-mono text-pre "
50
50
v-html =" getType(item[header])"
51
51
/>
52
52
</template >
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { VuetifyServiceContract } from 'vuetify/types/services'
15
15
16
16
export default function goTo (
17
17
_target : VuetifyGoToTarget ,
18
- _settings : Partial < GoToOptions > = { }
18
+ _settings : GoToOptions = { }
19
19
) : Promise < number > {
20
20
const settings : GoToOptions = {
21
21
container : ( document . scrollingElement as HTMLElement | null ) || document . body || document . documentElement ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import {
16
16
} from './services/presets'
17
17
18
18
// Service Options
19
- import { GoToOptions } from './services/goto'
19
+ import { GoToOptions , VuetifyGoToTarget } from './services/goto'
20
20
21
21
export default class Vuetify {
22
22
constructor ( preset ?: Partial < UserVuetifyPreset > )
@@ -48,7 +48,7 @@ export interface VuetifyUseOptions {
48
48
49
49
export interface Framework {
50
50
readonly breakpoint : Breakpoint
51
- readonly goTo : < T extends string | number | HTMLElement | Vue > ( target : T , options ?: GoToOptions ) => Promise < T >
51
+ readonly goTo : ( target : VuetifyGoToTarget , options ?: GoToOptions ) => Promise < number >
52
52
application : Application
53
53
theme : Theme
54
54
icons : Icons
Original file line number Diff line number Diff line change 1
1
// Types
2
2
import Vue from 'vue'
3
3
4
- type VuetifyGoToTarget = number | string | HTMLElement | Vue
4
+ export type VuetifyGoToTarget = number | string | HTMLElement | Vue
5
5
6
6
export type VuetifyGoToEasing =
7
7
( ( t : number ) => number ) |
@@ -26,3 +26,5 @@ export interface GoToOptions {
26
26
easing ?: VuetifyGoToEasing
27
27
appOffset ?: boolean
28
28
}
29
+
30
+ export default function goTo ( target : VuetifyGoToTarget , options ?: GoToOptions ) : Promise < number >
You can’t perform that action at this time.
0 commit comments