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

[chore] ambient modules and imports #2266

Merged
merged 15 commits into from
Aug 24, 2021
Merged

[chore] ambient modules and imports #2266

merged 15 commits into from
Aug 24, 2021

Conversation

ignatiusmb
Copy link
Member

A stepping stone for #2223 and a groundwork for #2249

@changeset-bot
Copy link

changeset-bot bot commented Aug 22, 2021

⚠️ No Changeset found

Latest commit: 0ca9c63

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ignatiusmb
Copy link
Member Author

We can bikeshed ambient-imports.d.ts and ambient-modules.d.ts, but maybe we'll just have it in one file for this PR now to prevent the scrambled diffing on ambient-modules.

@ignatiusmb ignatiusmb marked this pull request as ready for review August 22, 2021 11:02
@ignatiusmb
Copy link
Member Author

Reminder for the next PR to also resolve #625

@ignatiusmb
Copy link
Member Author

Updated the comments. For the polka issue we'll just have to ignore them for now, casting the types would make sense if we're actually writing TS, but ignoring them makes more sense here, plus we've also put our reasons for every ignore and expect errors so it's clearer than casting (which we should try to avoid if possible).

@ignatiusmb ignatiusmb marked this pull request as draft August 24, 2021 02:45
@ignatiusmb ignatiusmb marked this pull request as ready for review August 24, 2021 05:20
Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the reasons for adding @sveltejs/kit/node etc, so I can't say much about that. Type-wise, this looks good. If I remember correctly, the type Page = import('@sveltejs/kit').Page were needed because else they were not picked up during development on Kit itself. Did that change?

@ignatiusmb
Copy link
Member Author

Thanks, and yes! Other than having to disable eslint duplicate imports, it seems to be working fine now.

@benmccann benmccann merged commit 2099d33 into master Aug 24, 2021
@benmccann benmccann deleted the ambient-types branch August 24, 2021 13:07
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

Successfully merging this pull request may close these issues.

3 participants