Try Install Learn Blog API Packages GitHub
Pages

Type System

In Mint the types and type definitions are only for the type checker and compiler, they are not available or used by the runtime.

Because of that types can be defined in any type definition (except Records and Enums), so for example if Time is not defined as an Enum or Record when writing this:

module Time {
  fun now : Time {
    ...
  }
}

will define Time as a type.

Since only this function defines this as a return type we can safely use the same type in type signatures of other functions:

fun day (date : Time) : Number {...}
fun format (pattern : String, date : Time) : String {...}

because the Time.now() is the only place values of Time can come from.