I am using TypeScript to generate some DOM element from a templated string
. Now I know that in plain old javascript + JQuery you can do: var domObj = $(myString)
or to make it more evident: var comObj = $('<div></div>');
and it works just like that.
I've been trying to do the same with TS and I always get some error telling me it can't say which overload to use.
Is there any other way to do what I'm trying to do? Can it be done in TS?
Edit:
The issue I'm facing is not how to use JQuery
from TypeScript is about a specific feature I want to load a string
variable to a JQuery
object, I know it can be done in plain old js
but I get overloading errors when doing so.
Unlike this question which asks how to use JQuery
from ts
, which I have mostly figured out except for that little details I have just mentioned