Skip to content

Spec issues with new Template Literal down leveling #1327

@jridgewell

Description

@jridgewell
  1. Untagged template literals don't call @@toPrimitive correctly
  2. Tagged template literals need to have the entire TemplateStringsArray frozen
    • The cooked is currently still mutable
  3. The TemplateStringsArray must be cached per call site

As a bonus, there's a small size win that you can get if the cooked and raw are the same (there are no \ escape sequences), see babel/babel#7352.

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