I am trying to create a javascript object from Typescript.
This is the Javasript object I am trying to create: https://cdnjs.cloudflare.com/ajax/libs/chess.js/0.10.2/chess.js
In the javascript sample, you just create the object like this:
this.engine = new Chess();
How do I do this in Typescript?
I imported the object like this (I downloaded the file and added it to my project):
import * as Chess from './../chess.js';
However, if I try to create a Chess object I get a build error:
const engine = new Chess();
Error says: Cannot use 'new' with an expression whose type lacks a call or construct signature.