Runtime Effect schema for any ECHO relation.
Use for validation, parsing, or as a reference target for collections.
A relation has id, source, and target fields plus any additional properties.
NOTE: Schema.is(Type.Relation) does STRUCTURAL validation only (checks for id field).
Use Relation.isRelation() for proper ECHO instance type guards that check the KindId brand.
Example
// Structural type guard (accepts any object with id field) if (Schema.is(Type.Relation)(unknownValue)) { ... }
// ECHO instance type guard (checks KindId brand) if (Relation.isRelation(unknownValue)) { ... }
Runtime Effect schema for any ECHO relation. Use for validation, parsing, or as a reference target for collections. A relation has
id, source, and target fields plus any additional properties.NOTE:
Schema.is(Type.Relation)does STRUCTURAL validation only (checks foridfield). UseRelation.isRelation()for proper ECHO instance type guards that check the KindId brand.Example