Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lifenautjoe opened this issue Feb 26, 2020 · 10 comments

Comments

@lifenautjoe
Copy link

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
Copy link

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
Copy link

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.

zym-mcarlo added a commit to zym-mcarlo/v-tooltip that referenced this issue Mar 18, 2020
@backbone87
Copy link

backbone87 commented Mar 30, 2020

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
Copy link

SachsKaylee commented May 29, 2020

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
Copy link

Also rising question what is the status ?

@ahules
Copy link

ahules commented Aug 17, 2020

Have the same problem.

@Rossomasha
Copy link

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

@heggi
Copy link

heggi commented Aug 17, 2020

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

@andrewsmith1996
Copy link

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

@Akryum
Copy link
Owner

Akryum commented Dec 30, 2020

Duplicate of #459

@Akryum Akryum marked this as a duplicate of #459 Dec 30, 2020
@Akryum Akryum closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests