vuejs / rollup-plugin-vue

Roll .vue files
https://vuejs.github.io/rollup-plugin-vue
MIT License
846 stars 148 forks source link

An error occurs when building Teleport using the <script setup lang="ts"> #419

Closed Wizard67 closed 3 years ago

Wizard67 commented 3 years ago

Version

6.0.0

Reproduction link

https://github.com/Wizard67/rollup-vue

Steps to reproduce

  1. install dependencies.
  2. run build script.

What is expected?

Building Success.

What is actually happening?

typescript throws the following error.

semantic error TS2345: Argument of type '{ new (): { $props: VNodeProps & TeleportProps; }; __isTeleport: true; }' is not assignable to parameter of type 'string | ComponentOptions<any, any, any, Record<string, ComputedGetter<any> | WritableComputedOptions<any>>, MethodOptions, any, any, any> | ... 9 more ... | ClassComponent'.
  Type '{ new (): { $props: VNodeProps & TeleportProps; }; __isTeleport: true; }' is not assignable to type 'ComponentPublicInstanceConstructor<any, any, any, any, Record<string, ComputedGetter<any> | WritableComputedOptions<any>>, MethodOptions>'.
    Types of property '__isTeleport' are incompatible.
      Type 'true' is not assignable to type 'never'.

Using options api is working fine.

Wizard67 commented 3 years ago

This should be a Vue issue.