src/type.jsx

abstract class Type

static const var voidType : VoidType

static const var nullType : NullType

static const var booleanType : BooleanType

static const var integerType : IntegerType

static const var numberType : NumberType

static const var stringType : StringType

static const var variantType : VariantType

new Type()

function serialize() : variant

abstract function isAssignable() : boolean

abstract function isConvertibleTo(type : Type) : boolean

abstract function getClassDef() : ClassDefinition

abstract function instantiate(instantiationContext : InstantiationContext) : Type

function equals(x : Type) : boolean

function resolveIfNullable() : Type

function asAssignableType() : Type

function toNullableType() : Type

function toNullableType(force : boolean) : Type

static function templateTypeToString(parameterizedTypeName : string, typeArgs : Array.<Type>) : string

static function isIntegerOrNumber(type : Type) : boolean

static function calcLeastCommonAncestor(type1 : Type, type2 : Type) : Type

static function calcLeastCommonAncestor(type1 : Type, type2 : Type, acceptVariant : boolean) : Type

static function calcLeastCommonAncestor(types : Array.<Type>) : Type

static function calcLeastCommonAncestor(types : Array.<Type>, acceptVariant : boolean) : Type

class VoidType extends Type

new VoidType()

override function instantiate(instantiationContext : InstantiationContext) : VoidType

override function isAssignable() : boolean

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class NullType extends Type

new NullType()

override function instantiate(instantiationContext : InstantiationContext) : NullType

override function isAssignable() : boolean

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

abstract class PrimitiveType extends Type

new PrimitiveType()

override function instantiate(instantiationContext : InstantiationContext) : Type

override function isAssignable() : boolean

class BooleanType extends PrimitiveType

new BooleanType()

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class IntegerType extends PrimitiveType

new IntegerType()

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class NumberType extends PrimitiveType

new NumberType()

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class StringType extends PrimitiveType

new StringType()

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class VariantType extends Type

new VariantType()

override function instantiate(instantiationContext : InstantiationContext) : VariantType

override function isAssignable() : boolean

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class NullableType extends Type

new NullableType(type : Type)

override function instantiate(instantiationContext : InstantiationContext) : Type

override function equals(x : Type) : boolean

override function isConvertibleTo(type : Type) : boolean

override function isAssignable() : boolean

override function getClassDef() : ClassDefinition

function getBaseType() : Type

override function toString() : string

class VariableLengthArgumentType extends Type

new VariableLengthArgumentType(type : Type)

override function instantiate(instantiationContext : InstantiationContext) : VariableLengthArgumentType

override function equals(x : Type) : boolean

override function isConvertibleTo(type : Type) : boolean

override function isAssignable() : boolean

override function getClassDef() : ClassDefinition

function getBaseType() : Type

override function toString() : string

class ObjectType extends Type

new ObjectType(classDef : ClassDefinition)

override function instantiate(instantiationContext : InstantiationContext) : Type

override function equals(x : Type) : boolean

function resolveType(context : AnalysisContext) : void

override function isConvertibleTo(type : Type) : boolean

override function isAssignable() : boolean

override function getClassDef() : ClassDefinition

override function toString() : string

class ParsedObjectType extends ObjectType

new ParsedObjectType(qualifiedName : QualifiedName, typeArgs : Array.<Type>)

function getToken() : Token

function getQualifiedName() : QualifiedName

function getTypeArguments() : Array.<Type>

override function instantiate(instantiationContext : InstantiationContext) : Type

override function resolveType(context : AnalysisContext) : void

override function toString() : string

abstract class FunctionType extends Type

new FunctionType()

abstract function getObjectType() : Type

abstract function getExpectedTypes(numberOfArgs : number, isStatic : boolean) : Array.<Array.<Type>>

abstract function deduceByArgumentTypes(context : AnalysisContext, operatorToken : Token, argTypes : Array.<Type>, isStatic : boolean) : ResolvedFunctionType

override function isConvertibleTo(type : Type) : boolean

override function getClassDef() : ClassDefinition

override function instantiate(instantiationContext : InstantiationContext) : FunctionType

class FunctionChoiceType extends FunctionType

new FunctionChoiceType(types : Array.<ResolvedFunctionType>)

override function isAssignable() : boolean

override function asAssignableType() : Type

override function deduceByArgumentTypes(context : AnalysisContext, operatorToken : Token, argTypes : Array.<Type>, isStatic : boolean) : ResolvedFunctionType

override function getExpectedTypes(numberOfArgs : number, isStatic : boolean) : Array.<Array.<Type>>

override function toString() : string

override function getObjectType() : Type

abstract class ResolvedFunctionType extends FunctionType

new ResolvedFunctionType(token : Token, returnType : Type, argTypes : Array.<Type>, isAssignable : boolean)

function setIsAssignable(isAssignable : boolean) : ResolvedFunctionType

override function isAssignable() : boolean

override function asAssignableType() : Type

function getToken() : Token

function getReturnType() : Type

function getArgumentTypes() : Array.<Type>

override function deduceByArgumentTypes(context : AnalysisContext, operatorToken : Token, argTypes : Array.<Type>, isStatic : boolean) : ResolvedFunctionType

override function getExpectedTypes(numberOfArgs : number, isStatic : boolean) : Array.<Array.<Type>>

override function toString() : string

override function getObjectType() : Type

class StaticFunctionType extends ResolvedFunctionType

new StaticFunctionType(token : Token, returnType : Type, argTypes : Array.<Type>, isAssignable : boolean)

override function instantiate(instantiationContext : InstantiationContext) : StaticFunctionType

override function equals(x : Type) : boolean

override function isConvertibleTo(type : Type) : boolean

override function getObjectType() : Type

class MemberFunctionType extends ResolvedFunctionType

new MemberFunctionType(token : Token, objectType : Type, returnType : Type, argTypes : Array.<Type>, isAssignable : boolean)

override function equals(x : Type) : boolean

override function getObjectType() : Type