@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Variable childrenConst

    children: <P extends Obj.Any, T extends Obj.Any>(
        parent: P,
        items: T[],
        attach: (parent: Obj.Mutable<P>, refs: Ref.Ref<T>[]) => void,
    ) => Effect.Effect<T[], SampleSpaceError, Database.Service> = ...

    Adds items to the database as children of parent and hands attach their refs so the caller writes them into whichever membership array holds them. Membership and order are that array; the parent edge rides along for the deletion cascade.

    Type declaration

      • <P extends Obj.Any, T extends Obj.Any>(
            parent: P,
            items: T[],
            attach: (parent: Obj.Mutable<P>, refs: Ref.Ref<T>[]) => void,
        ): Effect.Effect<T[], SampleSpaceError, Database.Service>
      • Type Parameters

        • P extends Obj.Any
        • T extends Obj.Any

        Parameters

        • parent: P
        • items: T[]
        • attach: (parent: Obj.Mutable<P>, refs: Ref.Ref<T>[]) => void

        Returns Effect.Effect<T[], SampleSpaceError, Database.Service>