Skip to content

charnog/vue-default-export

Repository files navigation

vue-default-export

  1. Create a <script setup lang="ts"> Setup.vue component
  2. Define the props via an interface
interface Props {
    msg: string;
}

defineProp<Props>();
  1. Create a <script lang="ts"> Define component that uses Setup.vue
  2. npm run type-check
npm i
npm run type-check

You'll see

src/components/Define.vue:20:1 - error TS4082: Default export of the module has or is using private name 'Props'.

 20 export default defineComponent({
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21   components: {
    ~~~~~~~~~~~~~~~
... 
 23   },
    ~~~~
 24 });
    ~~~

Found 1 error.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published