of

fun of(setup: Setup<Unit>.() -> Unit): Module<Unit>

Constructs a module with no config.

Return

A Module with no config.

Parameters

setup

A function that sets up the module.


fun <T : Any> of(config: () -> T, setup: Setup<T>.() -> Unit): Module<T>

Constructs a module with config.

Return

A Module with the provided config.

Parameters

config

A function that returns the configuration for the module.

setup

A function that sets up the module.