Rename a property or method from an existing Type.
mod_type(type, 'ren', name, to)
Argument | Type | Description |
---|---|---|
type | str | Name of the Type where the property or method has to be modified from. |
'ren' |
str | Passing this argument will result in a modify action. |
name | str | Name of the property or method that has to be modified. |
to | str | New name for the property or method that has to be modified. |
The value nil
.
This code shows the return value for the action ren:
// Create type `Person`
set_type('Person', {
name: 'str',
a: 'int',
});
// Rename `a` to `age`
mod_type('Person', 'ren', 'a', 'age');
Return value in JSON format
null