UNPKG

civ7-modding-tools

Version:
30 lines (23 loc) 659 B
import { ActionGroupBundle } from "../core"; import { BaseFile } from "../files"; export class BaseBuilder<T extends Object = object> { actionGroupBundle: ActionGroupBundle = new ActionGroupBundle(); constructor() { } fill<T>(payload: Partial<T> = {}) { for (const [key, value] of Object.entries(payload)) { if (this.hasOwnProperty(key) ) { (this as any)[key] = value; } } this.migrate(); return this; } migrate() { return this; } // this should return files build(): BaseFile[] { return []; } }