fix: better volar type inference for template bindings on refs

This commit is contained in:
Andrew Bastin
2021-12-17 14:20:32 +05:30
parent 1a1baa715d
commit af35d68dfe
3 changed files with 14 additions and 1 deletions

View File

@@ -136,6 +136,7 @@
"@types/splitpanes": "^2.2.1",
"@types/uuid": "^8.3.3",
"@urql/devtools": "^2.0.3",
"@vue/composition-api": "^1.4.1",
"@vue/runtime-dom": "^3.2.26",
"@vue/test-utils": "^1.3.0",
"babel-core": "^7.0.0-bridge.0",

11
packages/hoppscotch-app/vue2-shim.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// 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,
ObjectDirective,
FunctionDirective,
} from "@vue/composition-api"
}