Helper methods to use on values, types and classes.

Static methods

staticinlineanyValueToString(value:Dynamic):String

Returns a string describing the type of any value.

statichasSuperClass(cls:Class<Dynamic>, sup:Class<Dynamic>):Bool

Returns true if cls extends sup or one of its children.

It also returns true if cls and sup are the same.

staticinlineisAnonymousObject(v:Dynamic):Bool

isAnonymousObject returns true if v is an object and it is not an instance of any custom class.

staticisEnumValue(v:Dynamic):Bool

Returns true if v is an instance of any Enum type.

staticisObject(v:Dynamic):Bool

Returns true if the passed value is an anonymous object or class instance but it is not any of the primitive types.

staticisPrimitive(v:Dynamic):Bool

Returns true if v is any of the following types: Int, Float, Bool, Date or String.

staticsameType<A, B>(a:A, b:B):Bool

sameType returns true if the arguments a and b share exactly the same type.

statictoString(type:ValueType):String

Returns a string representation of a ValueType.

statictypeInheritance(type:ValueType):Array<String>

typeInheritance returns an array of string describing the entire inheritance chain of the passed ValueType.

staticinlinevalueTypeInheritance<T>(value:T):Array<String>

valueTypeInheritance returns an array of string describing the entire inheritance chain of the passed value.

staticinlinevalueTypeToString<T>(value:T):String

Returns a string describing the type of any value.