Closed meetpatel1989 closed 3 years ago
I did not add type define of RexPlugins.Board.xxx
, (have no idea how to add type define of global variable)
Please try import Board class from 'phaser3-rex-plugins/plugins/board-components.js'. See this test code
Thanks for the quick reply but I'm still getting the same error after importing board class from components as you have mentioned.
Sorry for the inconvenience.
Perhaps it is an issue of typescript config, see this discussion thread.
@rexrainbow Thanks for the hint. It worked. I really appreciate your help.
Installed the board plugin through npm and loading the plugin in the game config file. I'm getting the board class when I print the class in the console but when I'm trying to define the class like in this demo it is not working.
The game failed to load with the following error Uncaught TypeError: Class constructor Board cannot be invoked without 'new'
The error points to the constructor line of the Board class.