Skip to content

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

Merged
bluwy merged 1 commit intomainfrom
import-meta-types
Oct 14, 2023
Merged

feat: add import-meta.d.ts#14615
bluwy merged 1 commit intomainfrom
import-meta-types

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-cat patak-cat 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 😬

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