typescript-transform-jsx icon indicating copy to clipboard operation
typescript-transform-jsx copied to clipboard

Support lit-element?

Open Jack-Works opened this issue 5 years ago • 3 comments

render() {
        return html`Web Components are <span>${this.mood}</span>!`;
}

https://github.com/Polymer/lit-element

Lit-element need a html`string` but this transformer seems only emit `string`

Jack-Works avatar Feb 14 '20 13:02 Jack-Works

Could you expand a little more in what is the expected input&output here?

danielpza avatar Feb 14 '20 14:02 danielpza

e.g. Input

<div />

Output

html\`<div />\`

You can see the document of lit-element. It's a framework use tagged template string as it's template

Jack-Works avatar Feb 14 '20 15:02 Jack-Works

I think this feature escape the scope of the project a bit... but why not, I think it shouldn't be that hard.

I plan to add it under an option, something like output: lit-element or something like that, What do you think?

I'll probably work on it when I have time, you're free to look up the code and make a PR :smile:

danielpza avatar Feb 14 '20 17:02 danielpza