So recently I have stumbled upon syntax that is new to me in Typescript eg:
someFunction`Literal template goes here`
no parantesis, no nothing. As a result function someFunction
is called. Does it have some sort of name? Why paranthesis is not required here? Why it does not work for eg string?
Complete code and working (sort of) example
function test(v:ReadonlyArray<string>){
console.log(v);
console.log(v.length);
}
function test2(v:Readonly<string>){
console.log(v);
}
console.log("gonna do it");
test`and iv done it
really done it!`;
test2"something else??"; // does not work