<?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: Error TS2740 in Typescript source for Angular application in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-ts2740-in-typescript-source-for-angular/m-p/1096350#M74598</link>
    <description>&lt;P&gt;Typescript doesn't allow for autocasting, which is what's being used in line 7. To create a point, you'll have to use something like&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const point: Point = new Point({
  longitude: 12.600913,
  latitude: 42.55151,
  etc.
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 13:29:09 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-09-08T13:29:09Z</dc:date>
    <item>
      <title>Error TS2740 in Typescript source for Angular application</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-ts2740-in-typescript-source-for-angular/m-p/1096294#M74593</link>
      <description>&lt;P&gt;Hi everyone in the Community.&lt;BR /&gt;&lt;BR /&gt;I'm developing an Angular application using Typescript and ES modules syntax, but I'm facing a problem when I try to define some ArcGIS objects taking source from sample API application on Esri website.&lt;/P&gt;&lt;P&gt;For example the following code fails:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import Point from '@arcgis/core/geometry/Point';

...

const point: Point = {
  //Create a point
  type: 'point',
  longitude: 12.600913,
  latitude: 42.55151,
};&lt;/LI-CODE&gt;&lt;P&gt;according to following pages on API documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/add-a-point-line-and-polygon/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/add-a-point-line-and-polygon/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but just at editing time I got this error:&lt;/P&gt;&lt;P&gt;error TS2740: Type '{ type: "point"; longitude: number; latitude: number; }' is&lt;BR /&gt;missing the following properties from type 'Point': m, x, y, z, and 21 more.&lt;/P&gt;&lt;P&gt;Same behaviour occurs if I define in different ways the object.&lt;/P&gt;&lt;P&gt;May any of you explain what I'm making wrong and how to solve it?&lt;/P&gt;&lt;P&gt;Thanks in advance and best regards.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 11:16:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-ts2740-in-typescript-source-for-angular/m-p/1096294#M74593</guid>
      <dc:creator>PaoloF</dc:creator>
      <dc:date>2021-09-08T11:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error TS2740 in Typescript source for Angular application</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-ts2740-in-typescript-source-for-angular/m-p/1096350#M74598</link>
      <description>&lt;P&gt;Typescript doesn't allow for autocasting, which is what's being used in line 7. To create a point, you'll have to use something like&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const point: Point = new Point({
  longitude: 12.600913,
  latitude: 42.55151,
  etc.
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 13:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/error-ts2740-in-typescript-source-for-angular/m-p/1096350#M74598</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-09-08T13:29:09Z</dc:date>
    </item>
  </channel>
</rss>

