hi,
I am exporting a class from a js file like this :
var Game = cc.Class({
});
module.exports = Game;
I am storing the file called ws.js in the same folder as my typescript file and want to import Game into typescript.
I tried:
import Game = require ("./Game");
the above statement went on top of my ts file.
I am getting the error : cannot find module ‘./Game’
I want to know how I can import the js class into typescript and how to instantiate an object of the class and call a function of the class from typescript.
Thanks!