Giter Site home page Giter Site logo

test-bug-vue-3.3-defineprops-with-import's Introduction

Test Vue 3.3

Need --force due to a dependency problem.

npm i -f

Bug with defineProps and TypeScript import :
MaisonCard.vue

// Bug
import type { MaisonResponse } from '@/pocketbase-types'
// Work with extra import `MaisonRecord`
import type { MaisonResponse, MaisonRecord } from '@/pocketbase-types'
defineProps<MaisonResponse>()

pocketbase-types.ts

export type MaisonResponse = Required<MaisonRecord> & BaseSystemFields

Error msg

[plugin:vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

<snip>.../src/components/MaisonCard.vue
<snip>.../src/components/MaisonCard.vue
    at ScriptCompileContext.error (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:15839:11)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17964:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35)
    at resolveBuiltin (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18222:13)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17952:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35)
    at <snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17922:31
    at Array.map (<anonymous>)
    at innerResolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17922:20)
    at resolveTypeElements (<snip>.../node_modules/vue/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17900:35

test-bug-vue-3.3-defineprops-with-import's People

Contributors

ppierre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.