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

Typescript types not available #6

Open
FilipChalupa opened this issue Jul 28, 2023 · 8 comments
Open

Typescript types not available #6

FilipChalupa opened this issue Jul 28, 2023 · 8 comments

Comments

@FilipChalupa
Copy link
Contributor

Maybe because 61f31b7 is not released yet.

@noamr
Copy link
Owner

noamr commented Aug 9, 2023

I released it now (sorry, was off-grid for a while).

@FilipChalupa
Copy link
Contributor Author

I'm not sure it works properly. Npmjs.org still shows no [TS] badge and neither can I get types to work in my project.

@vkuprin there should be "types": "…" in package.json which is missing, right?

No badge

image

Other repository with the badge

image

@vkuprin
Copy link
Contributor

vkuprin commented Aug 16, 2023

@FilipChalupa The cleaner approach would be to rewrite everything in types and eliminate .js files altogether. Relying on declaration files can lead to some problems with package types, as we've seen. I will make a patch soon to cover everything in TypeScript. Please bear with me

@vkuprin
Copy link
Contributor

vkuprin commented Aug 16, 2023

@FilipChalupa @noamr Please take a look at my patch #7
With npm run build:packages it should create a dist folder with .js files

@FilipChalupa
Copy link
Contributor Author

@vkuprin thank you for your quick response. 🙂 I'm worried that the changes will complicate use without TypeScript. May I suggest an edit? Something like this: vkuprin#1. It's not perfect. I've been forced to place a few @ts-ignore and I'm not completely sure that types will be picked up from exports.*.types but I believe it is a step in right direction. 🤷‍♀️

@vkuprin
Copy link
Contributor

vkuprin commented Aug 16, 2023

@FilipChalupa Merged your changes! Good point. It's not perfect, but we are gradually improving our hook. Adding test coverage with something like Jest could potentially be our next steps

@vkuprin
Copy link
Contributor

vkuprin commented Aug 21, 2023

@noamr The last CI pipe has failed. Please redeploy or let's push to the master .lock files to avoid pipeline failures. Right now, it's an old version

Screenshot 2023-08-21 at 12 08 14

@williamisnotdefined
Copy link

Meanwhile I have created a .d.ts with the following statement:
declare module "use-view-transitions/next";

it made the vscode stop complaining about the library installation, hope it work for you guys

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

4 participants