UNPKG
@relaxed/vue-directives
Version:
latest (2.0.34)
2.0.34
2.0.32
2.0.29
2.0.28
2.0.27
2.0.24
2.0.22
2.0.20
2.0.18
2.0.17
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.5
2.0.3
2.0.2
2.0.1
1.1.2
1.0.11
1.0.9
1.0.8
1.0.6
vue 兼容2 3 工具库 函数库
github.com/ErKeLost/relaxed
ErKeLost/relaxed
@relaxed/vue-directives
/
src
/
compatible
/
isVue3.ts
12 lines
(8 loc)
•
214 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import { App }
from
'vue'
interface
Vue2
{
default
: { version:
string
} }
const
isVue3 = (app: Vue2 | App): app
is
App =>
'config'
in
app &&
'globalProperties'
in
app.config export { isVue3 }