Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string'.ts(2345)

I am getting the Typescript error message

Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string'.ts(2345)

for the following line

const newSvg = svg`<svg>`;

Is there a way to get this to work? I stumbled upon this error while trying to debug the following line

d3.select( svg`<svg>`)

which gives similar error messages.

I get no such error when I try to enter similar lines into an Observable notebook. It would help a lot if you link shared your notebook and posted the link here.

Are you using typescript? It’s a typescript error.

This is exactly the kind of thing that will come through, if you share a link to your work. :confused: