2023-07-21 15:27:38 -04:00

10 lines
308 B
TypeScript

import { APIBaseComponent, ComponentType } from "@biscuitland/common";
export abstract class BaseComponent<TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,> {
constructor(public data: Partial<TYPE>) {}
toJSON(): TYPE {
return { ...this.data } as TYPE;
}
}