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

Type error in v13.1.1 #534

Closed
evanjo03 opened this issue Mar 15, 2022 · 5 comments
Closed

Type error in v13.1.1 #534

evanjo03 opened this issue Mar 15, 2022 · 5 comments

Comments

@evanjo03
Copy link

evanjo03 commented Mar 15, 2022

Type error when using version 13.1.1

Appears to the same problem described in this issue. Looks like a fix was applied for v14, but not for v13.

node_modules/twemoji/index.d.ts:32:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

32 const twemoji: {
   ~~~~~


Found 1 error in node_modules/twemoji/index.d.ts:32

To Reproduce
Steps to reproduce the behavior:

  1. npm init @open-wc and follow prompts
  2. cd [project-name] && npm i
  3. npm i @joeattardi/emoji-button
  4. Add import { EmojiButton } from "@joeattardi/emoji-button";
  5. npm run tsc
  6. See error

Expected behavior
Tsc occurs without issues.

Screenshots
image

Environment
Chrome 99.0.4844.51

@evanjo03 evanjo03 changed the title Type error in v13.0.1 Type error in v13.1.1 Mar 15, 2022
@hthetiot
Copy link
Contributor

Not exactly the same fix since 13.x expose ParseObject and possibly other module exports, my suggestion migrate to 14.0.1 and use import twemoji from 'twemoji';

@hthetiot
Copy link
Contributor

@evanjo03 once #535 is merged we can make PR to fix @joeattardi/emoji-button in the meantime adding npm i twemoji@13.0.0 after the install fix the issue.

Workarround:

  1. npm init @open-wc and follow prompts
  2. cd [project-name] && npm i
  3. npm i @joeattardi/emoji-button
  4. Add import { EmojiButton } from "@joeattardi/emoji-button";
  5. npm i twemoji@13.0.0
  6. npm run build

@evanjo03
Copy link
Author

Yep no problem! Appreciate you looking into this. Our team is pinning twemoji to version 13.0.0 temporarily and its working fine.

@hthetiot
Copy link
Contributor

That been said, I tried to fix "@joeattardi/emoji-button" with #535 but I get other errors due @FortAwesome update.

src/icons.ts(22,3): semantic error TS2345: Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.

@jdecked
Copy link
Contributor

jdecked commented Mar 31, 2022

@hthetiot @evanjo03 this should be fixed in v14.0.2. Can you upgrade and LMK if you're still having issues?

@jdecked jdecked closed this as completed Jul 23, 2022
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

3 participants