Helpful
    Preparing search index...
    • This is just a method that allows you to tag an interpolation string as a syntax language.

      This is useful with IDE extensions that can detect the language and do the syntax highlighting for you.

      Parameters

      • strings: TemplateStringsArray

        The string breaks for interpolation.

      • ...expressions: unknown[]

        The equivalent expressions that break apart the single string literal.

      Returns string

      The compiled string literal. This is no different than letting native JavaScript do it for you.

      const html = tag;
      const css = tag;

      const $html = html`
      <div>Some IDE extensions will highlight this as html</div>
      `

      const $css = css`
      button {
      display: grid;
      }
      `