File tree 4 files changed +853
-14
lines changed
4 files changed +853
-14
lines changed Original file line number Diff line number Diff line change 30
30
- run : yarn build
31
31
env :
32
32
CI : true
33
+ - run : yarn tsd
Original file line number Diff line number Diff line change 9
9
"module" : " dist/vue-test-utils.esm-bundler.js" ,
10
10
"files" : [
11
11
" dist" ,
12
- " README.md"
12
+ " README.md" ,
13
+ " dist/index.d.ts"
13
14
],
14
15
"dependencies" : {
15
16
"lodash" : " ^4.17.15"
21
22
"@rollup/plugin-node-resolve" : " ^7.1.3" ,
22
23
"@types/estree" : " ^0.0.42" ,
23
24
"@types/jest" : " ^24.9.1" ,
25
+ "@types/node" : " 12.12.35" ,
24
26
"@types/lodash" : " ^4.14.149" ,
25
27
"@vue/compiler-sfc" : " ^3.0.0-alpha.13" ,
26
28
"babel-jest" : " ^25.2.3" ,
33
35
"rollup" : " ^1.31.1" ,
34
36
"rollup-plugin-typescript2" : " ^0.26.0" ,
35
37
"ts-jest" : " ^25.0.0" ,
38
+ "tsd" : " 0.11.0" ,
36
39
"typescript" : " ^3.7.5" ,
37
40
"vue" : " ^3.0.0-alpha.13" ,
38
41
"vue-jest" : " vuejs/vue-jest#next" ,
48
51
},
49
52
"scripts" : {
50
53
"test" : " yarn jest --runInBand tests" ,
54
+ "tsd" : " tsd" ,
51
55
"build" : " yarn rollup -c rollup.config.js" ,
52
56
"lint" : " prettier -c --parser typescript \" (src|tests)/**/*.ts?(x)\" " ,
53
57
"lint:fix" : " yarn lint --write"
61
65
"*.ts" : [
62
66
" prettier --parser=typescript --write"
63
67
]
68
+ },
69
+ "tsd" : {
70
+ "directory" : " test-dts" ,
71
+ "compilerOptions" : {
72
+ "strict" : false ,
73
+ "lib" : [" esnext" , " dom" ]
74
+ }
64
75
}
65
76
}
Original file line number Diff line number Diff line change
1
+ import { expectType } from 'tsd'
2
+ import { defineComponent } from 'vue'
3
+ import { mount } from '../src'
4
+
5
+ const App = defineComponent ( {
6
+ props : {
7
+ a : String
8
+ } ,
9
+ template : ''
10
+ } )
11
+
12
+ const wrapper = mount ( App )
13
+ expectType < any > ( wrapper . vm . a ) // should be string
You can’t perform that action at this time.
0 commit comments