Skip to content

Commit

Permalink
fix(types): ref unwrapping in template, kudos @johnsoncodehk !
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 22, 2021
1 parent e0b0a78 commit cd24f26
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 189 deletions.
181 changes: 0 additions & 181 deletions global.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import './global'
import './shims'
export * from './dist/index'
2 changes: 1 addition & 1 deletion nuxt.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import './global'
import './shims'
export * from './dist/nuxt'
export { default } from './dist/nuxt'
1 change: 0 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"vue": "^2.6.14"
},
"devDependencies": {
"@vue/reactivity": "^3.2.4",
"vite": "^2.5.0",
"vite-plugin-inspect": "^0.2.2",
"vite-plugin-vue2": "^1.8.1",
Expand Down
2 changes: 0 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rollup-plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import './global'
import './shims'
export * from './dist/rollup-plugin'
export { default } from './dist/rollup-plugin'
6 changes: 6 additions & 0 deletions shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// workaround for Volar to infer the ref type in <template>
// https://github.com/johnsoncodehk/volar/issues/404
declare module '@vue/runtime-dom' {
export * from '@vue/runtime-dom/dist/runtime-dom'
export { defineComponent, PropType } from '@vue/composition-api'
}
2 changes: 1 addition & 1 deletion vite-plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import './global'
import './shims'
export * from './dist/vite-plugin'
export { default } from './dist/vite-plugin'
2 changes: 1 addition & 1 deletion webpack-plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import './global'
import './shims'
export * from './dist/webpack-plugin'
export { default } from './dist/webpack-plugin'

0 comments on commit cd24f26

Please sign in to comment.