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

ShockScript: Type expressions

Syntax

    TypeExpression :
      *
      void
      null
      [lookahead ≠ ( ] [lookahead ≠ map { ] [lookahead ≠ tap { ] QualifiedIdentifier
      ( TypeExpression )
      ( TypeExpression , TypeExpressionList )
      ( TypeExpression , TypeExpressionList , )
      TupleTypeExpression
      map RecordTypeExpression
      tap RecordTypeExpression
      FunctionTypeExpression
      TypeExpression PropertyOperator
      TypeExpression [lookahead = . ] QueryOperator
      TypeExpression TypeArguments
      TypeExpression NonNull
      TypeExpression ?
    TypeExpressionList :
      TypeExpression
      TypeExpressionList , TypeExpression
    TupleTypeExpression :
      [ TypeExpression ]
      [ TypeExpression , TypeExpressionList ]
      [ TypeExpression , TypeExpressionList , ]
    RecordTypeExpression :
      {}
      { RecordTypeItemList }
      { RecordTypeItemList }
    RecordTypeItemList :
      RecordTypeField
      RecordTypeField , RecordTypeItemList
      ... TypeExpression
    RecordTypeField :
      NonAttributeQualifiedIdentifier : TypeExpression
    FunctionTypeExpression :
      function ( ) : TypeExpression
      function ( FunctionTypeParameterList ) : TypeExpression
      function ( FunctionTypeParameterList , ) : TypeExpression
    FunctionTypeParameterList :
      FunctionTypeParameter
      FunctionTypeParameterList , FunctionTypeParameter
    FunctionTypeParameter :
      ... TypeExpressionopt
      TypeExpression [lookahead ≠ = ]
      TypeExpression =
    TypeArguments :
      . < TypeArgumentsList ParameterizedGreaterThan
    ParameterizedGreaterThan :
      >
      first greater-than > from the offending token
    TypeArgumentsList :
      TypeExpression
      TypeArgumentsList , TypeExpression