LeDDGroup / typescript-transform-jsx

Typescript transform jsx to string
MIT License
26 stars 1 forks source link

Support lit-element? #14

Open Jack-Works opened 4 years ago

Jack-Works commented 4 years ago
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`

danielpza commented 4 years ago

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

Jack-Works commented 4 years ago

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

danielpza commented 4 years ago

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: