Effect CommunityEC
Effect Community2w ago
2 replies
Semaelse

Creating Branded, Redacted Schemas in Effect Typescript

Is it possible to create Branded, Redacted schema's?

export type PlainApiKey = typeof PlainApiKey.Type;
export const PlainApiKey = Schema.Redacted(
  Schema.NonEmptyString.pipe(Schema.brand("PlainApiKey"))
);


I am not understanding how to make the actual object in my app, since the usual EncryptedApiKey.make does not exist.

Using Redacted.make also seems to be a challenge due to the Brand.
Was this page helpful?