Skip to content

Support passing generic type parameters to html function? #96

Description

@karlhorky

Hi @mjbvz, first of all, thanks for your effort creating this extension, very useful!

I wanted to find out if you'd be open to supporting passing TypeScript generic type parameters to the html function? Eg. both of:

  1. Single-line generic type parameters
  2. Multi-line generic type parameters

The extension currently doesn't highlight with either of these:

Screen Shot 2022-04-02 at 16 11 43

Code:

const withHighlight = html`<div></div>`;
const noHighlight = html<string>` <div></div> `;
const alsoNoHighlight = html<
  // longer generic type parameter
  ButtonHTMLAttributes<HTMLButtonElement>
>` <div></div> `;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions