Akryum / floating-vue

💬 Easy tooltips, popovers, dropdown, menus... for Vue
https://floating-vue.starpad.dev/
MIT License
3.34k stars 336 forks source link

index.d.ts : Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. #473

Closed lifenautjoe closed 3 years ago

lifenautjoe commented 4 years ago

Hey there.

I believe there's an issue with the provided typings.

 ERROR  ERROR in /Users/lifenautjoe/Documents/code/okuna/okuna-web/node_modules/v-tooltip/types/index.d.ts(3,1):
3:1 Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
    1 | import Vue, { VueConstructor, DirectiveOptions, PluginFunction } from 'vue';
    2 |
  > 3 | const vToolTip: PluginFunction<any>;
      | ^

Running this with Nuxt

"nuxt": "2.11.0",

and typescript runtime

"@nuxt/typescript-runtime": "0.3.8",
Pandazaur commented 4 years ago

Hello, I had the same issue.

It looks like the types folder was added in the v2.0.3. I temporarily downgraded to the v2.0.2 to make my build possible

maybeanerd commented 4 years ago

the error is related to this issue in Typescript

tried to create a fix, but couldn't do so quickly. I guess downgrading to v2.0.2 is the way to go until TS finally supports these typings.

backbone87 commented 4 years ago

the error is related to this issue in Typescript

while it is related, the correct way is to use declare const vToolTip: ... since you cant actually init anything in .d.ts files. (const vToolTip; isnt even valid js)

SachsKaylee commented 4 years ago

What's the status on this PR #464? For now I've created a fork and fixed this manually but I'd rather depend on this version than my own monkey patched one

Szymon-dziewonski commented 4 years ago

Also rising question what is the status ?

ahules commented 4 years ago

Have the same problem.

Rossomasha commented 4 years ago

Hi. I have the same issue. Have to downgrade the version to v2.0.2.

heggi commented 4 years ago

Adding to package.json "v-tooltip": "github:Akryum/v-tooltip#pull/464/head", as temporary solution

andrewsmith1996 commented 4 years ago

Same issue here, downgrading to v2.0.2 works for me.

Akryum commented 3 years ago

Duplicate of #459