Typescript support

I’ve spent 4 hours trying to use melonjs (v14.1.0 installed via npm) in combination with typescript with no success, any feedback is welcomed!

This is my tsconfig.json file

  "compilerOptions": {
    "module": "es6",
    "target": "es6",
    "moduleResolution": "node"

And this is my index.ts file

import * as me from 'melonjs/dist/melonjs.module.js';
me.device.onReady(function () {});

Running “npx tsc” fails with the following error:

error TS2306: File '/Users/lauski/testmelon/node_modules/melonjs/dist/melonjs.module.d.ts' is not a module.

I’ve tried all the variations of the import statement I could think of with no success…

by the look of it, it would say you forgot to add allowJS in your config file ? that’s the one that allows mixing JS and TS.