Open mroch opened 7 years ago
As far as I understand, there are two parts here: (1) parsing and (2) type checking. I’d like to comment on the type checking part.
Consider the latex
function in @mroch’s example. Currently, the first parameter of a template-tag-function always has the type Array<string>
(as far as I know). I guess that type would need to be changed to something like Array<string | void> & {raw: Array<string>}
?
https://github.com/tc39/proposal-template-literal-revision is stage 4. tagged template literals should be allowed to have invalid escape sequences like
see https://github.com/tc39/test262/blob/master/test/language/expressions/tagged-template/invalid-escape-sequences.js for some more examples.