Skip to content

Commit

Permalink
change name and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuckame committed Apr 17, 2024
1 parent e555fdf commit 39e8694
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,14 @@ public val SerialDescriptor.nullable: SerialDescriptor
}

/**
* Returns the serial descriptor previously transformed to nullable with [SerialDescriptor.nullable] back
* to its original form.
* Returns non-nullable serial descriptor for the type, if [this] is a nullable descriptor created automatically or
* with `.nullable` extensions on a descriptor or serializer. Otherwise, returns [this].
*
* @see SerialDescriptor.nullable
* @see KSerializer.nullable
*/
@ExperimentalSerializationApi
public val SerialDescriptor.unwrapNonNull: SerialDescriptor
public val SerialDescriptor.unwrapNullable: SerialDescriptor
get() = when (this) {
is SerialDescriptorForNullable -> original
else -> this
Expand Down

0 comments on commit 39e8694

Please sign in to comment.