Skip to content

Commit

Permalink
Made helper methods internal
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Jan 27, 2024
1 parent 7a2ae5d commit 2fb7f58
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ import kotlin.jvm.JvmName

//** Helper method to perform an update operation. */
@JvmName("performUpdateFields")
inline fun encodeFieldAndValue(
@PublishedApi
internal inline fun encodeFieldAndValue(
fieldsAndValues: Array<out Pair<String, Any?>>,
buildSettings: EncodeSettings.Builder.() -> Unit,
) = encodeFieldAndValue(fieldsAndValues, encodeField = { it }, encodeValue = { encode(it, buildSettings) })

/** Helper method to perform an update operation. */
@JvmName("performUpdateFieldPaths")
inline fun encodeFieldAndValue(
@PublishedApi
internal inline fun encodeFieldAndValue(
fieldsAndValues: Array<out Pair<FieldPath, Any?>>,
buildSettings: EncodeSettings.Builder.() -> Unit,
) = encodeFieldAndValue(fieldsAndValues, { it.encoded }, { encode(it, buildSettings) })

/** Helper method to perform an update operation in Android and JS. */
inline fun <T, K> encodeFieldAndValue(
@PublishedApi
internal inline fun <T, K> encodeFieldAndValue(
fieldsAndValues: Array<out Pair<T, Any?>>,
encodeField: (T) -> K,
encodeValue: (Any?) -> Any?
Expand Down

0 comments on commit 2fb7f58

Please sign in to comment.