Effect CommunityEC
Effect Communityβ€’2y agoβ€’
6 replies
jessekelly

jessekelly's thread

Would it be possible to extend Effect.Tag to include class methods? Or is this just a bad idea..

export class Person extends Effect.Tag("Person")<
    Person,
    {
        firstName: string;
        lastName: string;
    }
>() {
    get fullName() {
        return `${this.Type.firstName} ${this.Type.lastName}`;
    }
}

Person.fullName; // I would expect Effect<string>
Was this page helpful?