storeOf
fun <D, T, M> storeOf(initialData: D, validation: Validation<D, T, M>, metadataDefault: T, job: Job = Job(), id: String = Id.next()): ValidatingStore<D, T, M>
fun <D, T, M> WithJob.storeOf(initialData: D, validation: Validation<D, T, M>, metadataDefault: T, job: Job = this.job, id: String = Id.next()): ValidatingStore<D, T, M>
Convenience function to create a simple ValidatingStore without any handlers, etc.
The created Store validates its model after every update automatically.
Parameters
initialData
first current value of this Store
validation
Validation instance to use at the data on this Store.
metadataDefault
default metadata to be used by the automatic validation (where no explicit values are given)
job
Job to be used by the Store
fun <D, M> storeOf(initialData: D, validation: Validation<D, Unit, M>, job: Job, id: String = Id.next()): ValidatingStore<D, Unit, M>
fun <D, M> WithJob.storeOf(initialData: D, validation: Validation<D, Unit, M>, job: Job = this.job, id: String = Id.next()): ValidatingStore<D, Unit, M>
Convenience function to create a simple ValidatingStore without any metadata and handlers.
The created Store validates its model after every update automatically.