Object
Type module
Sources
Items from Object can be imported/included and used via following ways.
/** * Import via main package * Access items like: am4core.object.myVariable */import * as am4core from "@amcharts/amcharts4";
/** * Import via: Object.ts * Access items like: $object.myVariable */import * as $object from "@amcharts/amcharts4/Object";/** * Include via "core.js" * Access items like: am4core.object.myVariable */Variables
Object does not have any variables.
Functions
clone(object:Object)Returns
ObjectReturns object clone.
copyAllProperties(from:object,
to:object)Returns
voidCopies all properties from one object to another.
copyProperties(source:object,
target:object,
keys:Array<string>)Returns
voidCopies all properties of one object to the other, omitting undefined.
eachOrdered(object:Object,
fn: (key:Key, value:Object[""]) =>void,
ord: (a:$type.Keyof<Object>, b:$type.Keyof<Object>) =>Ordering)Returns
voidOrders object properties using custom
ordfunction and iterates through them callingfnfor each of them.entries(object:Object)Returns
Iterator<...>Returns an iterator for all entries in object.
Can be used to safely iterate through all properties of the object.
forceCopyProperties(source:object,
target:object,
keys:Array<string>)Returns
voidCopies a list of properties from one object to another.
Will copy empty properties.
getKey(object:Object,
key:Key)Returns
Object[""]Returns value of the specific
key.hasKey(object:Object,
key:Key)Returns
booleanChecks if
objecthas a specifickey.keys(object:Object)Returns
Array<$type.Keyof<Object>>Returns an array of object's property names.
keysOrdered(object:Object,
order: (a:$type.Keyof<Object>, b:$type.Keyof<Object>) =>Ordering)Returns
Array<$type.Keyof<Object>>Returns an array of object's property names ordered using specific ordering function.
merge(object1:Object1,
object2:Object2)Returns
Object1&Object2Merges two objects and returns a new object that contains properties from both source objects.
softCopyProperties(source:object,
target:object,
keys:Array<string>)Returns
voidCopies all properties of one object to the other, omitting undefined, but only if property in target object doesn't have a value set.