Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Support JSX syntax #9

Open
adidahiya opened this issue Jan 15, 2019 · 1 comment
Open

Support JSX syntax #9

adidahiya opened this issue Jan 15, 2019 · 1 comment

Comments

@adidahiya
Copy link

It's probably just as simple as renaming the file to file.tsx:

const sourceFile = getSourceFile("file.ts", source);

@johnwiseheart
Copy link
Contributor

JSX would be nice. I had a look at just renaming the file, but with this code:

const a = <div>Test</div>;

ran into some issues with the built-in typescript compiler not knowing what div actually is. This thread seems pretty relevant here - it was pretty easy to get JSX to work without validation by just disabling validation but thats not so nice. Might come back to this but would certainly accept a PR if anyone feels like it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants