-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix: add ambient types to published files #980
Conversation
Thanks for catching this! Could you adjust the jsconfig as well? |
Done! |
I'm still having a really hard time understanding The explanation on the original PR https://github.com/sveltejs/kit/pull/917/files/51a1212c29801a473304e06a3194a5d8f206f9ba#r611350994 was that I also think the name "ambient" is a confusing way to name the file because as far as I understand the types in |
It's probably just how types are organized within a certain codebase, there's really no right or wrong though as long as it works. But, having ambient modules certainly helps make it cleaner. The name "ambient" simply means it is without implementation. It's similar to how compiled TypeScript will generate a
I think it's the other way around, it should not have any top-level imports. Perhaps it could be considered as global types in some ways where we usually |
That's what I thought. I believe the types in What's the issue with putting all the types in a single |
The types in
Combining them in one
Why do you think a file called I think naming it
Which means any file with an Is there anything else besides the naming and multiple type files? We could certainly put everything in one |
I'm fine having two files and having them where they live. It's just the name that bothers me. Ambient is meaningless in my mind because every The TypeScript docs call the construct "ambient modules": https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules. Would |
I did |
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.
thanks for the rename
hmm. looks like there's a merge conflict now |
I generally agree that the types need some more cleanup. I like the idea of adding a |
Publish ambient types added by #917. Sorry, I didn't get to catch this before it was merged
$app/
in itsjsconfig.json