-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(next): reference astro/client from astro/config #11925
Conversation
🦋 Changeset detectedLatest commit: 006deef The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Is this related to the |
It's unrelated. It's the only file I found is in all our starters than can hold this reference (now that env.d.ts is optional) |
In that case, can you explain why we need this? Wouldn't there be other types errors if |
The idea is to get the basic types (thing |
@Princesseuh suggests that we add this reference in |
Fine by me if it works. I'm not sure if TypeScript works correctly if referenced this way. |
I know @Fryuni used to rely on that for inox tools, and i think there was a few gotchas. Do you mind reminding us what they are? |
Adding references, directly or indirectly, on the Astro config only works if the config file is being analyzed by TS. All on Inox Tools provide the virtual modules indirectly, just like the idea of having the reference in It requires on the following configs to work:
The TSconfig files shipped with Astro all works, but an empty one using TS defaults won't. A custom one maybe works. |
allowJs: true is enabled by default in our presets so I think it's fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Interestingly, I had to swap the order of our default tsconfig |
…m/withastro/astro into feat/next-config-client-reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me!
Changes
include
to avoid overriding typesTesting
Manually
Docs
Changeset. I'll submit a docs PR if this one is merged