@dxos/echo
    Preparing search index...

    Function getSchema

    • Returns the Effect Schema for a type entity.

      • For static Type.Obj / Type.Relation entities the source Effect Schema is read from a hidden slot — these overloads preserve the instance type.
      • For Type.Type entities (the meta-schema kind) the schema is rebuilt from type.jsonSchema; the instance type isn't statically knowable so the wide AnyEntity overload widens to Schema.Codec<any, any>.

      Always call this when you need to interact with the Effect Schema API (e.g. before passing to Effect.Schema functions). For ECHO-side APIs (Obj.make, Filter.type, Ref) pass the type entity directly.

      Only accepts Type.AnyEntity — raw Schema.Schema values can be used directly without unwrapping.

      Type Parameters

      Parameters

      • type: T

      Returns Codec<InstanceType<T>, unknown>

      O(1) cached read; a persisted type rebuilds its Effect Schema from jsonSchema (O(schema size)) on first access.

    • Returns the Effect Schema for a type entity.

      • For static Type.Obj / Type.Relation entities the source Effect Schema is read from a hidden slot — these overloads preserve the instance type.
      • For Type.Type entities (the meta-schema kind) the schema is rebuilt from type.jsonSchema; the instance type isn't statically knowable so the wide AnyEntity overload widens to Schema.Codec<any, any>.

      Always call this when you need to interact with the Effect Schema API (e.g. before passing to Effect.Schema functions). For ECHO-side APIs (Obj.make, Filter.type, Ref) pass the type entity directly.

      Only accepts Type.AnyEntity — raw Schema.Schema values can be used directly without unwrapping.

      Type Parameters

      Parameters

      • type: T

      Returns Codec<InstanceType<T>, unknown>

      O(1) cached read; a persisted type rebuilds its Effect Schema from jsonSchema (O(schema size)) on first access.

    • Returns the Effect Schema for a type entity.

      • For static Type.Obj / Type.Relation entities the source Effect Schema is read from a hidden slot — these overloads preserve the instance type.
      • For Type.Type entities (the meta-schema kind) the schema is rebuilt from type.jsonSchema; the instance type isn't statically knowable so the wide AnyEntity overload widens to Schema.Codec<any, any>.

      Always call this when you need to interact with the Effect Schema API (e.g. before passing to Effect.Schema functions). For ECHO-side APIs (Obj.make, Filter.type, Ref) pass the type entity directly.

      Only accepts Type.AnyEntity — raw Schema.Schema values can be used directly without unwrapping.

      Parameters

      Returns Codec<any, any>

      O(1) cached read; a persisted type rebuilds its Effect Schema from jsonSchema (O(schema size)) on first access.