<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: @types/arcgis-js-api Allow ignoring autocastable properties in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/types-arcgis-js-api-allow-ignoring-autocastable/m-p/1006335#M70965</link>
    <description>&lt;P&gt;This is a limitation of TypeScript because we can't have different types for getters and setters. So you can't get clean autocasting in this manner. You could type the props "as any", but still not ideal. For TypeScript it is recommended you new up instances as needed.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 20:36:23 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2020-12-02T20:36:23Z</dc:date>
    <item>
      <title>@types/arcgis-js-api Allow ignoring autocastable properties</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/types-arcgis-js-api-allow-ignoring-autocastable/m-p/1006122#M70955</link>
      <description>&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;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"
    }
  }]
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;"Object literal may only specify known properties, and 'type' does not exist in type 'TextSymbolProperties | LabelSymbol3DProperties'"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have to use&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;// &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69004"&gt;@ts&lt;/a&gt;-ignore&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;over and over.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And this is just an example. The same could be applied to many things!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 10:52:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/types-arcgis-js-api-allow-ignoring-autocastable/m-p/1006122#M70955</guid>
      <dc:creator>EmreCan</dc:creator>
      <dc:date>2020-12-02T10:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: @types/arcgis-js-api Allow ignoring autocastable properties</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/types-arcgis-js-api-allow-ignoring-autocastable/m-p/1006335#M70965</link>
      <description>&lt;P&gt;This is a limitation of TypeScript because we can't have different types for getters and setters. So you can't get clean autocasting in this manner. You could type the props "as any", but still not ideal. For TypeScript it is recommended you new up instances as needed.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 20:36:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/types-arcgis-js-api-allow-ignoring-autocastable/m-p/1006335#M70965</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2020-12-02T20:36:23Z</dc:date>
    </item>
  </channel>
</rss>

