mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56:07 +00:00
fix(Base): data is optional (#225)
This commit is contained in:
parent
ca51b1f535
commit
97cd39eb10
@ -3,7 +3,7 @@ import type { APIBaseComponent, ComponentType } from '../types';
|
||||
export abstract class BaseComponentBuilder<
|
||||
TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,
|
||||
> {
|
||||
constructor(public data: Partial<TYPE>) {}
|
||||
constructor(public data: Partial<TYPE> = {}) {}
|
||||
|
||||
toJSON(): TYPE {
|
||||
return { ...this.data } as TYPE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user