mirror of https://github.com/vuejs/core.git
15 lines
318 B
TypeScript
15 lines
318 B
TypeScript
|
import { createApp } from 'vue'
|
||
|
import { expectType } from './utils'
|
||
|
|
||
|
const app = createApp({})
|
||
|
|
||
|
app.directive<HTMLElement, string>('custom', {
|
||
|
mounted(el, binding) {
|
||
|
expectType<HTMLElement>(el)
|
||
|
expectType<string>(binding.value)
|
||
|
|
||
|
// @ts-expect-error not any
|
||
|
expectType<number>(binding.value)
|
||
|
},
|
||
|
})
|