TaggedClass
TaggedClass: <
Self>(identifier?) => <Tag,Fields>(tag,fieldsOr,annotations?) => [Self] extends [never] ? “Missing `Self` generic - use `class Self extends TaggedClass<Self>()(“Tag”, { … })`” :TaggedClass<Self,Tag,object&Fields>
Defined in: node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/dts/Schema.d.ts:4389
Type Parameters
Section titled “Type Parameters”Self = never
Parameters
Section titled “Parameters”identifier?
Section titled “identifier?”string
Returns
Section titled “Returns”<
Tag,Fields>(tag,fieldsOr,annotations?): [Self] extends [never] ? “Missing `Self` generic - use `class Self extends TaggedClass<Self>()(“Tag”, { … })`” :TaggedClass<Self,Tag,object&Fields>
Type Parameters
Section titled “Type Parameters”Tag extends string
Fields
Section titled “Fields”Fields extends Fields
Parameters
Section titled “Parameters”Tag
fieldsOr
Section titled “fieldsOr”Fields | HasFields<Fields>
annotations?
Section titled “annotations?”ClassAnnotations<Self, { [K in string | number | symbol]: Type<{ _tag: tag<Tag> } & Fields>[K] }>
Returns
Section titled “Returns”[Self] extends [never] ? “Missing `Self` generic - use `class Self extends TaggedClass<Self>()(“Tag”, { … })`” : TaggedClass<Self, Tag, object & Fields>
Example
Section titled “Example”import { Schema } from "effect"
class MyClass extends Schema.TaggedClass<MyClass>("MyClass")("MyClass", { a: Schema.String}) {}3.10.0