-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
TypeScript type error on imports: "The 'accessible-astro-components' library may need to update its package.json or typings." #51
Comments
Hey @JoshuaKGoldberg, thanks for submitting the issue! To be fair, I've got no experience with TypeScript. @david-abell did some incredible work to add TypeScript support to this project. I might look into it when I can find the time, but any help with this would be highly appreciated 😄 And thank you for the compliment, glad you find it useful! |
Hmm @JoshuaKGoldberg I get some git checkout errors with your supplied repo could be bad internet on my end atm. If you change the export key in your local
|
Hmm, the direct URL is https://github.com/JoshuaKGoldberg/joshuakgoldberg-dot-com/tree/6f8411168447dd6b41e9644ee954c3faa6b822fe if that helps.
Yup, that fixes it! |
Thanks for pitching in @david-abell, you're my TypeScript hero! 😃 And thanks for submitting the solution in a PR @JoshuaKGoldberg 👍🏼 |
Thanks @JoshuaKGoldberg @markteekman I got sick while puzzling over how to get these changes to pass "Are the types wrong". Hadn't seen that tool before but I'm impressed by it! Turns out it was the actual type definition imports at fault but I think I've got a working fix. I should be able to get a PR in for soon. |
Thanks @david-abell! Hope you're feeling better now 🙂 |
In a project using a
tsconfig.json
with"moduleResolution": "Bundler"
, trying toimport
fromaccessible-astro-components
gives a TypeScript type error:You can also see that the types are being flagged on https://arethetypeswrong.github.io/?p=accessible-astro-components%402.1.0.
Full repro steps:
git clone https://github.com/JoshuaKGoldberg/joshuakgoldberg-dot-com cd joshuakgoldberg-dot-com git checkout 6f8411168447dd6b41e9644ee954c3faa6b822fe pnpm i
...then open
BaseLayout.astro
in your editor (e.g.code .
).A couple of resources in case it's helpful:
Oh, and this library is awesome! Thanks for making it 😄
The text was updated successfully, but these errors were encountered: