Returns information about a given Type.

Value Description
type_id Internal Type ID (can be used to identify Types in collection events).
created_at Time Stamp when the Type is created.
modified_at Time Stamp when the Type is last modified or nil if never modified.
name Type’s name.
fields Array with arrays containing two strings, the property name and definition.

The modified_at time stamp is initially set to nil when the Type is created using the new_type(..) function. It will be updated with a time stamp after modifying the Type with either the set_type(..) or the mod_type(..) function. When the Type is created with set_type(..), then the modified_at property will be equal to created_at.

This function does not generate an event.




Argument Type Description
type_name str The name of the Type for which the information about the properties has to be returned.

Return value

Returns info about the Type.


This code shows the output of type_info():

// Just a Type as an example
set_type('Book', {
    title: 'str',
    year: 'int',

// Return Type info

Example return value in JSON format

    "type_id": 0,
    "created_at": 1579175900,
    "modified_at": 1579175900,
    "name": "Book",
    "fields": [
        ["title", "str"],
        ["year", "int"]