Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ts-template-tagNew to Visual Studio Code? Get it now.
ts-template-tag

ts-template-tag

Gadget Inc

|
7 installs
| (0) | Free
Syntax highlight typescript within template literals
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-ts-template-tag

Adds JS/TS syntax highlighting for JavaScript template literals like tss\1+1``.

Match on

javascript`` | js`` | typescript`` | ts`` | jsx`` | tsx`` | tsg``

Example

const code = ts`
  const truthy = (val: any): boolean => !!val;
`;

Caveat

You are responsible for defining the template literal yourself -- this extension just adds syntax highlighting for it. If you don't need any custom processing, you can use String.raw:

const ts = String.raw;

// later

ts`1 + 1`;
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft