With the current @types/arcgis-js-api it is not possible to autocast classes, because every propertie is required. Furthermore, the property 'type' is missing in the TextSymbolProperties. I can't generate a new TextSymbol like this:
layer.featureReduction = {
type: "cluster",
labelingInfo: [{
labelExpressionInfo: {
expression: "$feature.cluster_count"
},
deconflictionStrategy: "none",
labelPlacement: "center-center",
symbol: {
type: "text", // Error
color: "white",
font: {
size: "12px"
},
haloSize: 1,
haloColor: "black"
}
}]
};
I get this error message:
"Object literal may only specify known properties, and 'type' does not exist in type 'TextSymbolProperties | LabelSymbol3DProperties'"
I have to use // @ts-ignore over and over.
And this is just an example. The same could be applied to many things!