wonderful-panda/vue-tsx-support

Error: Duplicate string index signature

Closed this issue · 3 comments

Hi there, I installed this wonderful tool via vue-cli with the command vue add tsx-support.

Everything seems to be working fine ; however, when I compile I have the following error:

ERROR in /home/......../node_modules/vue-tsx-support/enable-check.d.ts
13:13 Duplicate string index signature.
    11 |         interface IntrinsicElements extends base.IntrinsicElements {
    12 |             // allow unknown elements
  > 13 |             [name: string]: any;
       |             ^
    14 | 
    15 |             // builtin components
    16 |             transition: base.TsxComponentAttrs<builtin.TransitionProps>;

Version: typescript 3.3.4000

Any tips on how to get rid of it? Thanks!

It's duplicated somewhere probably in vue tsx shims file

It is because enable-check.d.ts redefined [name: string]: any;, so clean all code in the shims-tsx.d.ts, and import "vue-tsx-support/enable-check";, it will work.

Thanks @jeffwcx it seems to work fine now!!