Skip to content

Commit

Permalink
Mention the type of addition fields with a rest descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryamZi committed Sep 20, 2024
1 parent 6939958 commit 663b081
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/open-records/open_records.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ A record type that uses either the `{` and `}` delimiters or the `{|` and `|}` d

When the record is open due to using the `{` and `}` delimiters, the expected type for any additional field is `anydata`. Such records belong to `map<anydata>`.

When the record is open due to the use of a rest descriptor, the expected type for any additional field is the type specified in the rest descriptor.

Quoted keys can be used to specify fields that are not explicitly specified in an open record type.

::: code open_records.bal :::
Expand Down

0 comments on commit 663b081

Please sign in to comment.