All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.pro.respawn.flowmvi.dsl.ContainerDsl.kt Maven / Gradle / Ivy

Go to download

A Kotlin Multiplatform MVI library based on plugins that is simple, fast, powerful & flexible

There is a newer version: 3.0.0
Show newest version
@file:Suppress("UnusedReceiverParameter")

package pro.respawn.flowmvi.dsl

import kotlinx.coroutines.CoroutineScope
import pro.respawn.flowmvi.api.Container
import pro.respawn.flowmvi.api.MVIAction
import pro.respawn.flowmvi.api.MVIIntent
import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.api.Store

// these extensions are needed to auto-resolve types to the Container class. They do literally nothing

/**
 * Alias for [pro.respawn.flowmvi.dsl.lazyStore] (with a scope)
 */
public inline fun  Container.lazyStore(
    initial: S,
    scope: CoroutineScope,
    crossinline configure: BuildStore
): Lazy> = pro.respawn.flowmvi.dsl.lazyStore(initial, scope, configure)

/**
 * Alias for [pro.respawn.flowmvi.dsl.lazyStore]
 */
public inline fun  Container.lazyStore(
    initial: S,
    crossinline configure: BuildStore
): Lazy> = pro.respawn.flowmvi.dsl.lazyStore(initial, configure)

/**
 * Alias for [pro.respawn.flowmvi.dsl.store]
 */
public inline fun  Container.store(
    initial: S,
    scope: CoroutineScope,
    crossinline configure: BuildStore
): Store = pro.respawn.flowmvi.dsl.store(initial, scope, configure)

/**
 * Alias for [pro.respawn.flowmvi.dsl.store]
 */
public inline fun  Container.store(
    initial: S,
    crossinline configure: BuildStore
): Store = pro.respawn.flowmvi.dsl.store(initial, configure)