import { Document } from "mongoose" ; import { TundraBot } from "../base/TundraBot" ; export default abstract class DBWrapper < T1 , T2 extends Document > { client : TundraBot ; constructor ( client ) { this . client = client ; } get ( type ) { return this . getOrCreate ( type ) ; } protected abstract getOrCreate ( type ) ; abstract create ( type ) ; save ( savedType ) { return savedType . save ( ) ; } }