Currently, I am developing a game and have a JavaScript class that I'm exporting like this:
var Game = cc.Class({
name: "WS",
});
module.exports = Game;
This code is located in a file named ws.js
.
Furthermore, within the same directory as ws.js
, there is a TypeScript file called transitions.ts
. In this file, I am attempting to import the Game
module using the following syntax:
import Game = require ("./Game");
However, upon trying to do so, an error is being thrown: cannot find module './Game'