getify/TypL

Treat tagged template literal as a function call expression

Opened this issue · 1 comments

function foo(x = number) {
   return true;
}

var x = foo`world`;

foo`world` should be validated as a call-expression, including both the template-literal (`world`) being validated as the first argument, as well as the return value type being implied to x.

Actually, template tag functions of course always have an array of strings (str[]) as their first argument... so the foo call-site shape should fail to match the function signature as indicated by that function declaration.