Effect CommunityEC
Effect Community17mo ago
4 replies
TashTolo

Making `org_commonName` Optional in OrganizationTelemetry Schema

Hi there.
I have the following schema:
export class OrganizationTelemetry extends Schema.Class<OrganizationTelemetry>(
  'OrganizationTelemetry'
)({
  org_connectionVisibility: Schema.propertySignature(Schema.String).pipe(
    Schema.fromKey('connectionVisibility')
  ),
  org_name: Schema.propertySignature(Schema.String).pipe(Schema.fromKey('name')),
  org_commonName: Schema.propertySignature(Schema.String).pipe(Schema.fromKey('commonName')),
  org_type: Schema.propertySignature(Schema.String).pipe(Schema.fromKey('type')),
}) {}


But I need org_commonName also optional. The issue is that the way I'm doing (https://effect.website/play#71a414871bb7) the compiler complaints.
Obviously I'm doing something wrong, but no idea what.
Was this page helpful?