restriction

Returns the lst restriction as type str or nil when the list is not value restricted.

This function does not generate a change.

Function

array.restriction()

Arguments

None

Return value

Returns restriction of the list or nil if not value restricted.

Example

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"