Type alias EntityEditEffects<Entity, LoadInput, SaveOutput, ValidationFailedType, LoadError, ValidationError, SaveError>

EntityEditEffects<Entity, LoadInput, SaveOutput, ValidationFailedType, LoadError, ValidationError, SaveError>: {
    load: EffectId<LoadInput | null, Entity, LoadError>;
    save: EffectId<Entity, SaveOutput, SaveError>;
    validation: EffectId<ModelWithDefault<Entity>, ModelValidationResult<Entity, ValidationFailedType>, ValidationError>;
}

Type specifying the effects for EntityEditFactory,

Type Parameters

  • Entity

  • LoadInput = number

  • SaveOutput = LoadInput

  • ValidationFailedType = string

  • LoadError = string

  • ValidationError = string

  • SaveError = string

Type declaration

  • load: EffectId<LoadInput | null, Entity, LoadError>

    effect that takes an entity-id or null and returns a corresponding entity (which sets the default model)

  • save: EffectId<Entity, SaveOutput, SaveError>

    effect that takes an entity and returns the id of the persisted entity

  • validation: EffectId<ModelWithDefault<Entity>, ModelValidationResult<Entity, ValidationFailedType>, ValidationError>

    effect that takes a ModelWithDefault for the entity and returns the corresponding ModelValidationResult

Generated using TypeDoc