Function getEntityEditSignalsFactory

  • Generic function to create a specific EntityEditFactory. This is another example for factory composition, composing (a) EffectSignalsFactory for entity loading (b) ModelSignalsFactory for entity changing (c) ValidatedInputWithResultSignalsFactory for validation and persiting

    Type Parameters

    • Entity

      specifies the entity type

    • LoadInput = number

      specifies the input-type for the loading-effect will be LoadInput | null (defaults to number)

    • SaveOutput = LoadInput

      specifies the output-type for the save-effect (defaults to LoadInput)

    • ValidationFailedType = string

      specifies the type representing a failed validations (total or for a distinct property, hence ModelValidationResult<Entity, ValidationFailedType> will be used as validation result)

    • LoadError = string

      specifies the error type of the load-effect

    • ValidationError = string

      specifies the error type of the validation-effect (use never, if your validation cannot error)

    • SaveError = string

      specifies the error type of the result-effect

    Returns EntityEditFactory<Entity, LoadInput, SaveOutput, ValidationFailedType, LoadError, ValidationError, SaveError>

Generated using TypeDoc