I want to type this.engine
property with GameEngine
something like, engine: GameEngine;
and but it causes error Property 'stop' does not exist on type 'GameEngine'
when using a GameEngine
stop()
method like below
Is this even possible? Or does it make sense?
export default class Game extends React.PureComponent { engine: GameEngine; // engine: any; // this one works ofcourse //... pause() { this.engine.stop() } render() { return (<GameEngine ref={(ref) => { this.engine = ref; }} /> ) }}