mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
10 lines
308 B
TypeScript
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;
|
|
}
|
|
}
|