import { DBTable } from "."; class Cat { age: number; furLength: "long" | "short"; constructor(age: number, furLength: "long" | "short") { this.age = age; this.furLength = furLength; } } class CatTable extends DBTable {} // Create a simple table with values in it const allData = test("constructor", async () => { // Build the DB const db = new CatTable( [ { age: 3, furLength: "short" }, { age: 5, furLength: "long" }, ], undefined, r => new Cat(r.age, r.length) ); // Request data const filteredData = db.filter(r => r.furLength === "long"); expect(filteredData instanceof CatTable).toBe(true); expect(db.toSuperArrays().age.min()).toBe(3); });