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

[JavaScript] Separate tagged template strings for TypeScript #4036

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

deathaxe
Copy link
Collaborator

This PR...

  1. creates separate embedded syntaxes for tagged template strings, used in TypeScript to ensure TypeScript being used in interpolations.
  2. improves extensibility of tagged template strings by providing a single context to add further variants of tagged templates to. This may help 3rd-party packages to more easily add features.

This commit ensures TypeScript syntax being used in tagged template string
interpolations, when working in TypeScript or TSX sources.

It copies everything from JavaScript and replaces `source.js` by `source.ts`.
This commit introduces a single entry point for 3rd-party customization
by adding a dedicated `literal-string-template-begin` context which further
variants of tagged-template strings can be added to.
@deathaxe deathaxe merged commit 9f4d776 into sublimehq:master Sep 18, 2024
1 check passed
@deathaxe deathaxe deleted the pr/javascript/ts-template-strings branch September 18, 2024 06:36
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