Skip to content

Commit 5bf9b74

Browse files
committed
types: improved props types
1 parent fd361ce commit 5bf9b74

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/floating-vue/src/components/PopperWrapper.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import Popper from './Popper.vue'
6666
import PopperContent from './PopperContent.vue'
6767
import PopperMethods from './PopperMethods'
6868
import ThemeClass from './ThemeClass'
69+
import type { Placement } from '../util/popper.js'
6970
7071
export type TriggerEvent = 'hover' | 'click' | 'focus' | 'touch'
7172
@@ -124,7 +125,7 @@ export default defineComponent({
124125
},
125126
126127
placement: {
127-
type: String,
128+
type: String as PropType<Placement>,
128129
default: undefined,
129130
},
130131
@@ -184,7 +185,7 @@ export default defineComponent({
184185
},
185186
186187
strategy: {
187-
type: String,
188+
type: String as PropType<'absolute' | 'fixed'>,
188189
default: undefined,
189190
},
190191
@@ -227,7 +228,7 @@ export default defineComponent({
227228
},
228229
229230
autoSize: {
230-
type: [Boolean, String],
231+
type: [Boolean, String] as PropType<boolean | 'min' | 'max'>,
231232
default: undefined,
232233
},
233234

0 commit comments

Comments
 (0)