Why can’t I call a function in an interpolated string? For example,
let stringFunction = (input : string) => {j|$(input) is a string"|j};
let testString = {j|This is a test string calling a function $(stringFunction)|j};
This is fine because it just logs “function”. But if I try this
let testString = {j|This is a test string calling a function $(stringFunction("test"))|j};
Will trigger an Error: `stringFunction(’ is not a valid syntax of interpolated identifer.
Piping the argument causes the same problem. Why is this?
