Returns the list restriction as type str or nil when the list is not value restricted. A list can only be restricted if the list is a property of a typed thing (see the example).
This function does not generate a change.
array.restriction()
None
Returns restriction of the list or nil
if not value restricted.
Using
restriction()
on a non-restricted list:
[1, 2, 3, 4].restriction();
Return value in JSON format
null
Using
restriction()
on a restricted list:
// Create an example type
set_type('X', {arr: '[int]'});
X{}.arr.restriction();
Return value in JSON format
"int"