effect-tea-persistent
    Preparing search index...
    • A part, declared as a program is, without a name, indexes or migrations, which are its parent's (decision 0133). Its schemas say what the program's say, and the sender it reads when it reads one. It may raise events for its parent, and take external messages from it, whose schemas give their types: neither is stored, since a parent handles them in the step.

      Type Parameters

      • State extends object
      • Flags
      • Inbound
      • Projection extends Json
      • Internal = never
      • Operation extends Readonly<{ _tag: string }> = never
      • Rejection = never
      • Sender = unknown
      • Event = never
      • External = never

      Parameters

      • schemas: Readonly<
            {
                event?: Schema.Codec<Event, Json>;
                external?: Schema.Codec<External, Json>;
                flags: Schema.Codec<Flags, Json>;
                inbound: Schema.Codec<Inbound, Json>;
                internal?: Schema.Codec<Internal, Json>;
                operation?: Schema.Codec<Operation, Json>;
                projection: Schema.Codec<Projection, Json>;
                rejection?: Schema.Codec<Rejection, Json>;
                sender?: Schema.Codec<Sender, Json>;
                state: Schema.Codec<State, Json>;
            },
        >

      Returns <
          const List extends DeclaredKeys = [],
          Operations extends
              Declared<Operation, Internal> = Declared<Operation, Internal>,
          const C extends
              Readonly<
                  Record<string, One<State, AnyPart> | Each<State, any, AnyPart>>,
              > = {},
      >(
          declaration: Readonly<
              {
                  children?: C;
                  keys?: List & LiteralNames<List>;
                  project: (state: State, children: Projections<State, C>) => Projection;
              },
          > & UpdateOf<
              State,
              Inbound
              | Internal
              | External,
              Sender,
              Event,
              Rejection,
              C,
          > & WorkOf<State, Internal, Operation, KeysOf<List>> & OperationsOf<
              Operation,
              Operations,
          > & OnEventOf<State, Event, C> & (
              [
                  | TakenBy<Inbound, Names<C>>
                  | TakenBy<Internal, Names<C>>
                  | TakenBy<External, Names<C>>,
              ] extends [never]
                  ? unknown
                  : Readonly<
                      {
                          "an own message takes the name of a child": | TakenBy<
                              Inbound,
                              Names<C>,
                          >
                          | TakenBy<Internal, Names<C>>
                          | TakenBy<External, Names<C>>;
                      },
                  >
          ) & (
              [TakenBy<Rejection, Names<C>>] extends [never]
                  ? unknown
                  : Readonly<
                      {
                          "an own reason takes the name of a child": TakenBy<
                              Rejection,
                              Names<C>,
                          >;
                      },
                  >
          ) & (
              [OperationsTakenBy<Operation, C>] extends [never]
                  ? unknown
                  : Readonly<
                      {
                          "an own operation takes the name of a child's": OperationsTakenBy<
                              Operation,
                              C,
                          >;
                      },
                  >
          ) & (
              [
                  {
                      [K in string]: [Sender] extends [PartIn<(...)[(...)]>["sender"]]
                          ? never
                          : K
                  }[Names<C>],
              ] extends [never]
                  ? unknown
                  : Readonly<
                      {
                          "a child reads a sender its parent does not have": {
                              [K in string]: [Sender] extends [PartIn<(...)>["sender"]]
                                  ? never
                                  : K
                          }[Names<C>];
                      },
                  >
          ) & Readonly<{ init: (flags: Flags, at: Utc) => State }>,
      ) => Part<
          Readonly<
              {
                  flags: Flags;
                  inbound: Inbound
                  | Wrapped<C, "inbound">;
                  internal: Internal | Wrapped<C, "internal">;
                  key: Extract<keyof KeysOf<List>, string> | ChildKey<C>;
                  operation: Operation | ChildOperation<C>;
                  parameter: ParametersOf<KeysOf<List>> & ChildParameter<C>;
                  projection: Projection;
                  rejection: Rejection | ChildRejection<C>;
                  sender: Sender;
                  services:
                      | Services<
                          Operations[keyof Operations] extends Readonly<
                              { run: (...args: ...) => ... },
                          >
                              ? Running
                              : never,
                      >
                      | ChildServices<C>;
                  state: State;
              },
          > & Readonly<{ event: Event; external: External; index: never }>,
      >