mirror of
https://github.com/apple/pkl.git
synced 2026-04-24 09:18:35 +02:00
Refine documentation for class Any (#1194)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -29,12 +29,14 @@ import "pkl:protobuf"
|
|||||||
/// Every type is a subtype of [Any].
|
/// Every type is a subtype of [Any].
|
||||||
///
|
///
|
||||||
/// The following operators are supported for all values:
|
/// The following operators are supported for all values:
|
||||||
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// value1 == value2 // equality
|
/// value1 == value2 // equality
|
||||||
/// value1 != value2 // inequality
|
/// value1 != value2 // inequality
|
||||||
/// value.member // member access
|
/// value.member // member access
|
||||||
/// value?.member // conditional member access; returns `value.member` if `value` is non-null and `null` otherwise
|
/// value?.member // conditional member access; returns `value.member` if `value` is non-null and `null` otherwise
|
||||||
/// value ?? default // null coalescing; returns `value` if `value` is non-null and `default` otherwise
|
/// value ?? default // null coalescing; returns `value` if `value` is non-null and `default` otherwise
|
||||||
|
/// value!! // non-null assertion; throws if `value` is `null`, and returns `value` otherwise
|
||||||
/// value is String // type test
|
/// value is String // type test
|
||||||
/// value as String // type cast; throws an error unless `value is String`
|
/// value as String // type cast; throws an error unless `value is String`
|
||||||
/// ```
|
/// ```
|
||||||
|
|||||||
Reference in New Issue
Block a user