-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Export KyInstance #383
Export KyInstance #383
Conversation
How is this better than just doing |
Some people (like me 😅) like to use build-in library types instead of inferring them but no problem if you don't think it's necessary 🙂 |
I think it's better to limit the exported types to a minimum. A lot of random types can overwhelm the user. Since the user can already use |
I'd like you to reconsider exporting the KyInstance type. Typescript complains about the lack of KyInstance export when using
It's possible to work around this by using |
That sounds more like a TypeScript bug if it only happens with |
Yes, it starts working when I add the export:
Honestly, I started looking into seeing if it was a bug in VSCode at first because I wasn't seeing the error in the console. While I was trying to set up a reproducible test case, I found out typescript itself was also showing the error. Eventually I figured out that tsconfig.tsbuildinfo swallows the error and doesn't display it again until something significant changes, or you delete the file. I started looking into if it's an issue with TS, and I was reading the documentation on composite which states
That lead me to here finding this PR though one of the weirdly similar duplicates of this one. At that point, I tried changing the The real bug in typescript is probably that the incremental builds don't display the error when re-running 🤦♂️ |
To avoid using
typeof ky
, we can use theKyInstance
type.