-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScript
Description
Bug Report
The first argument of String.raw
is typed as TemplateStringsArray
: this is fine when it is used as a tag function, but it is also useful on its own -- for example, calling it directly from your own tag function to do the job of interleaving strings and values as well as converting these values to strings. For such uses, it is convenient to call it with just { raw: [...] }
, since that is the only needed bit in the spec, and this can also be seen in several of the MDN examples.
So it should only require the raw
property to enable such uses.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript