Returns the set restriction as type str or nil when the set is not value restricted. A set can only be restricted if the set is a property of a typed thing (see the example).
This function does not generate a change.
set.restriction()
None
Returns restriction of the set or nil
if not value restricted.
Using
restriction()
on a non-restricted set:
set().restriction();
Return value in JSON format
null
Using
restriction()
on a restricted set:
// Create an example type
new_type('S');
set_type('Y', {set: '{S}'});
Y{}.set.restriction();
Return value in JSON format
"S"