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

feat: add import-meta.d.ts #14615

Merged
merged 1 commit into from
Oct 14, 2023
Merged

feat: add import-meta.d.ts #14615

merged 1 commit into from
Oct 14, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 13, 2023

Description

Close #13309
Non-breaking alternative to #14279

This adds types/imports-meta.d.ts that only proxies types/importMeta.d.ts. I tested locally and it seems to work in macos, but I'm not sure if it works for Linux. But from what I understand, the casing issue only affects <reference types not <reference path.

Additional context

Only added this one file for now, if there's more request, we can add for the others.

Also, should we mark this file as internal/experimental? (e.g. just a comment)


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Oct 13, 2023
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

I think the comment you made is enough if we choose this path. Hopefully, the issue will be resolved in TS and we can remove this later in a future major.

Astro (and others) will move to import-meta, and then later again need to move to importMeta (the other option would be to later delete importMeta instead). But maybe it is an ok price to pay for keeping the casing consistent with other files in the long term.

@bluwy
Copy link
Member Author

bluwy commented Oct 13, 2023

Yeah I think we can keep import-meta ephemeral for now, then once TS fixes it we can remove it 👍

@bluwy
Copy link
Member Author

bluwy commented Oct 14, 2023

I'll merge this for now since it's less controversial. I'm not a huge fan either but TypeScript 😬

@bluwy bluwy merged commit 598d423 into main Oct 14, 2023
9 checks passed
@bluwy bluwy deleted the import-meta-types branch October 14, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Types files have capitals in them, leading to them being unreferenceable downstream
3 participants