How to use Elm in tsx file?

Create a file called elm.d.ts with the following content:

declare module "*.elm" {
  export const Elm: any;
}

That should do the trick.

You can type it nicer than any if you want.

7 Likes