aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/hmr/ApplicationBase.kt
blob: ceea0fbc912aa04a5740c91bf151f1c6ef03e408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * @author Robert Jaros
 */
package pl.treksoft.kvision.hmr

/**
 * Base class for applications.
 *
 * Base class for applications supporting Hot Module Replacement (HMR).
 */
abstract class ApplicationBase {
    /**
     * Starting point for an application.
     * @param state Initial state between Hot Module Replacement (HMR).
     */
    abstract fun start(state: Map<String, Any>)

    /**
     * Ending point for an application.
     * @return final state for Hot Module Replacement (HMR).
     */
    abstract fun dispose(): Map<String, Any>
}