Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type definition

A type definition is used to define an alias to an existing type.

Syntax

type M = Map.<double, double>

Type definitions are only allowed in package blocks and top-level region and inside class blocks. When inside a class block, contributes a static property.

    TypeDefinition :
      type IdentifierName TypeParametersopt = TypeExpression