I'm trying to migrate my js code into typescript. One of the libs I use is sql.js. Successfully installed corresponding typing for it, but am blocked with creation of the database.
How it was in JS:
var db = new SQL.Database();
db.run('CREATE TABLE snapshots (dateTime LONGINT, snapshot BLOB)');
There is no parameterless constructor in sql.js/index.d.ts file:
class Database {
constructor(data: Buffer);
constructor(data: Uint8Array);
constructor(data: number[]);
run(sql: string): Database;
...
}
How to instanciate empty db object? What are these parameters in constructor overrides used for?