Effect CommunityEC
Effect Community3y ago
5 replies
attila

Compilation Errors: MissingSelfGeneric in Latest Version of `@effect/schema`

After upgrading to the latest version of @effect/schema I'm getting the following compilation errors:
node_modules/@effect/schema/Schema.d.ts:1425:321 - error TS2304: Cannot find name 'MissingSelfGeneric'.

1425     readonly transform: <Transformed>() => <FieldsB extends StructFields>(fields: FieldsB, decode: (input: A) => ParseResult.ParseResult<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, encode: (input: Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>) => ParseResult.ParseResult<A>) => [unknown] extends [Transformed] ? MissingSelfGeneric<"Base.transform"> : Class<I, Simplify<Omit<A, keyof FieldsB> & ToStruct<FieldsB>>, Transformed, Self>;

It's probably caused by MissingSelfGeneric marked as @internal and therefore it's being omitted from the emitted declaration file while it's still being referenced from the public Class interface. Should the @internal comment be removed @gcanti?
Was this page helpful?