@logixjs/core
    Preparing search index...

    Function make

    • ModuleTag.make:

      • Defines a domain module Tag using the given id and state/actions/reducers.
      • The returned ModuleTag is both a Context.Tag and a factory carrying its Shape.

      Note: since 022, the old Module (Tag identity) was renamed to ModuleTag; use Logix.Module for module definition objects.

      Type Parameters

      • Id extends string
      • SSchema extends unknown
      • ADefs extends ActionDefs

      Parameters

      • id: Id
      • def: {
            actions: ADefs;
            reducers?: ReducersFromMap<SSchema, ADefs>;
            state: SSchema;
            traits?: unknown;
        }
        • Readonlyactions: ADefs
        • Optional Readonlyreducers?: ReducersFromMap<SSchema, ADefs>
        • Readonlystate: SSchema
        • Optional Readonlytraits?: unknown

          traits:

          • Used to attach a StateTraitSpec (see specs/000-module-traits-runtime).
          • The current implementation builds a Program during ModuleTag.make, and injects a setup-only Logic in ModuleTag.implement to call StateTrait.install. (Note: if you use ModuleTag.live to export a Layer and want trait behavior, call StateTrait.install explicitly in logics, or use ModuleTag.implement instead.)

      Returns ModuleTagType<
          Id,
          ModuleShape<
              SSchema,
              Schema<
                  ActionsFromMap<NormalizedActionTokens<ADefs>>,
                  ActionsFromMap<NormalizedActionTokens<ADefs>>,
                  never,
              >,
              NormalizedActionTokens<ADefs>,
          >,
      >