Update output types of DataTree builders

This commit is contained in:
Alexander Nozik 2022-07-02 12:36:41 +03:00
parent 9cceb44a90
commit 9a24e1e392
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -102,7 +102,7 @@ public fun <T : Any> DataSource(
type: KType,
parent: CoroutineScope,
block: DataSourceBuilder<T>.() -> Unit,
): DataSource<T> {
): DataSourceBuilder<T> {
val tree = DataTreeBuilder<T>(type, parent.coroutineContext)
tree.block()
return tree
@ -112,7 +112,7 @@ public fun <T : Any> DataSource(
public inline fun <reified T : Any> DataSource(
parent: CoroutineScope,
crossinline block: DataSourceBuilder<T>.() -> Unit,
): DataSource<T> = DataSource(typeOf<T>(), parent) { block() }
): DataSourceBuilder<T> = DataSource(typeOf<T>(), parent) { block() }
@Suppress("FunctionName")
public suspend inline fun <reified T : Any> DataSource(