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

Tooltip types broken #660

Closed
evertbouw opened this issue Aug 26, 2020 · 6 comments
Closed

Tooltip types broken #660

evertbouw opened this issue Aug 26, 2020 · 6 comments
Labels
Status: Investigation Type: Bug Something isn't working

Comments

@evertbouw
Copy link

🐛 Bug report

Current Behavior

The components Tooltip and TooltipPopup are of type any

Expected behavior

They should be typed as a component

Reproducible example

Suggested solution(s)

The .d.ts file contains import("../../utils/src"), this folder doesn't exist. Changing to import("../../utils") fixed the issue locally.

Additional context

Your environment

Software Name(s) Version
Reach Package tooltip 0.11.0
React ^16.13.1
Browser n/a
Assistive tech n/a
Node 14.8.0
npm/yarn yarn 1.22.4
Operating System ubuntu 20.04
@karlhorky
Copy link
Contributor

karlhorky commented Aug 31, 2020

Wonder if it's because of the ts-node --transpile-only added in #654 ...

cc @chancestrickland

@chaance chaance added Type: Bug Something isn't working Status: Investigation labels Aug 31, 2020
@twavv
Copy link
Contributor

twavv commented Aug 31, 2020

For @reach/accordion version 0.10.4, @reach/utils is imported as import("@reach/utils") in the .d.ts files.

For @reach/tooltip version 0.11.0, @reach/utils is imported as import("../../utils/src") in the .d.ts files.

TypeScript is complaining that it can't find the declaration for the latter, which means that Tooltip has type any since it is defined in terms of ForwardRefExoticComponentWithAs.

@chaance
Copy link
Member

chaance commented Aug 31, 2020

I found the bug I introduced with the build overhaul. Hoping to have a patch either this afternoon or tomorrow!

@chaance
Copy link
Member

chaance commented Sep 1, 2020

Should be fixed in 0.11.2. Let me know if there are any issues here!

@chaance chaance closed this as completed Sep 1, 2020
@karlhorky
Copy link
Contributor

@chancestrickland thanks!

Is the fix mostly in 6b5fb4e and a8ef829 ?

@chaance
Copy link
Member

chaance commented Sep 1, 2020

a8ef829 was the one. I simplified the build from v0.10 and in the process consolidated the TS configs, and I forgot to make sure path aliases didn't make it into the build config. Build still passed locally and in CI because the ../../src path resolved, but not so in the published packages. Would love to update CI to catch that, but I didn't have time to explore too much. Just wanted to get a fix out quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Investigation Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants