<?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: Typescript: Are we supposed to use __esri to access types in the SDK? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1589953#M86602</link>
    <description>&lt;P&gt;I've seen the esri development team recommend the usage of the __esri namespace in the past - I've even seen a recommendation to alias __esri to esri.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use it extensively it across all of my projects when working with the ArcGIS JS AP for the exact situations you describe. Its much simpler then using something like the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://www.typescriptlang.org/docs/handbook/utility-types.html#constructorparameterstype" target="_blank" rel="noopener"&gt;ConstructorParameters&lt;/A&gt; utility typescript types!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2025 10:42:49 GMT</pubDate>
    <dc:creator>JonathanDawe_BAS</dc:creator>
    <dc:date>2025-02-27T10:42:49Z</dc:date>
    <item>
      <title>Typescript: Are we supposed to use __esri to access types in the SDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1589359#M86586</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;In some cases it is not clear to me where I should get the types for using the SDK. For instance, if I want to type an object as being properties that can be used to define a Featurelayer, I cannot find this type in the SDK reference shown here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#properties-summary" target="_blank"&gt;FeatureLayer | API Reference | ArcGIS Maps SDK for JavaScript 4.32 | Esri Developer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I've seen people using the namespace "__esri" to access interfaces, and here I can find the interface __esri.&lt;SPAN&gt;FeatureLayerProperties which suits my needs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it recommended to use interfaces and types from "__esri" or not?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 09:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1589359#M86586</guid>
      <dc:creator>ae</dc:creator>
      <dc:date>2025-02-26T09:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Typescript: Are we supposed to use __esri to access types in the SDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1589953#M86602</link>
      <description>&lt;P&gt;I've seen the esri development team recommend the usage of the __esri namespace in the past - I've even seen a recommendation to alias __esri to esri.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use it extensively it across all of my projects when working with the ArcGIS JS AP for the exact situations you describe. Its much simpler then using something like the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://www.typescriptlang.org/docs/handbook/utility-types.html#constructorparameterstype" target="_blank" rel="noopener"&gt;ConstructorParameters&lt;/A&gt; utility typescript types!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1589953#M86602</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2025-02-27T10:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Typescript: Are we supposed to use __esri to access types in the SDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1591503#M86615</link>
      <description>&lt;P&gt;It's a good question. In the recent release ESRI notes that there is a module for accessing "Union Types".&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/release-notes/#new-union-types" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/release-notes/#new-union-types&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping that module will continue to be expanded in the future (i.e. for MapView | SceneView and more). I also hope that other types/interfaces will be exposed in a public facing module in the future.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think there's anything particularly wrong with using __esri namespace at the moment, but since it's an internal namespace I would think that things could change in future releases that would require some code modifications without much or any notice.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 00:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-are-we-supposed-to-use-esri-to-access/m-p/1591503#M86615</guid>
      <dc:creator>GeoGalvanic</dc:creator>
      <dc:date>2025-03-04T00:29:25Z</dc:date>
    </item>
  </channel>
</rss>

