<?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: ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512392#M47749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not completely&amp;nbsp;sure that this is the issue, but I think this may&amp;nbsp;have to do with how the JS API typings work with "autocasting." &amp;nbsp; The signature for the basemap property is not string, it looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;interface&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;BasemapProperties&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;extends&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;LoadableProperties&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; baseLayers&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Collection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; id&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; loaded&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; boolean&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; portalItem&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; PortalItemProperties&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; referenceLayers&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Collection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; thumbnailUrl&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; title&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that although a string is valid for a basemap in javascript, it's not valid in typescript. &amp;nbsp;This issue discusses some workarounds:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/jsapi-resources/issues/77" title="https://github.com/Esri/jsapi-resources/issues/77" rel="nofollow noopener noreferrer" target="_blank"&gt;Typings for basemap not matching actual javascript · Issue #77 · Esri/jsapi-resources · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try passing in { id: "streets" } to the basemap property. &amp;nbsp;It may accept that. &amp;nbsp;You could also try one of the workarounds in that github issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:25:52 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2021-12-11T22:25:52Z</dc:date>
    <item>
      <title>ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512389#M47746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm using Visual Studio 2015 to try to create a widget for a web application and I'm having trouble getting started.&amp;nbsp; I'm following the tutorial on the ArcGIS API for JavaScript website: &lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Flatest%2Fguide%2Ftypescript-setup%2Findex.html" rel="nofollow" target="_blank"&gt;TypeScript - Setting up your development environment | ArcGIS API for JavaScript 4.4&lt;/A&gt;&amp;nbsp;, but I get red squiggles under all the properties, causing the application to not compile.&amp;nbsp; I think I installed the ArcGIS Typing correctly via npm.&amp;nbsp; An image is attached.&amp;nbsp; Any assistance would be greatly appreciated.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 19:13:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512389#M47746</guid>
      <dc:creator>KarenLai</dc:creator>
      <dc:date>2017-07-31T19:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512390#M47747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the error? &amp;nbsp;I'm not familiar with visual studio, but can you mouse over the underlined code to display the error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 19:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512390#M47747</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-07-31T19:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512391#M47748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for taking a look, Thomas.&amp;nbsp; The attached image shows the error list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365194_TSErrors.jpg" style="width: 620px; height: 362px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 19:30:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512391#M47748</guid>
      <dc:creator>KarenLai</dc:creator>
      <dc:date>2017-07-31T19:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512392#M47749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not completely&amp;nbsp;sure that this is the issue, but I think this may&amp;nbsp;have to do with how the JS API typings work with "autocasting." &amp;nbsp; The signature for the basemap property is not string, it looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;interface&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;BasemapProperties&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;extends&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;LoadableProperties&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; baseLayers&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Collection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; id&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; loaded&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; boolean&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; portalItem&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; PortalItemProperties&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; referenceLayers&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Collection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; thumbnailUrl&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; title&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that although a string is valid for a basemap in javascript, it's not valid in typescript. &amp;nbsp;This issue discusses some workarounds:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/jsapi-resources/issues/77" title="https://github.com/Esri/jsapi-resources/issues/77" rel="nofollow noopener noreferrer" target="_blank"&gt;Typings for basemap not matching actual javascript · Issue #77 · Esri/jsapi-resources · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try passing in { id: "streets" } to the basemap property. &amp;nbsp;It may accept that. &amp;nbsp;You could also try one of the workarounds in that github issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512392#M47749</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T22:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS API &amp; TypeScript &amp; Visual Studio 2015</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512393#M47750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Thomas!&amp;nbsp; The squiggles are all gone and the application compiled successfully.&amp;nbsp; This is a good start.&amp;nbsp; Thank you for your time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 21:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-typescript-visual-studio-2015/m-p/512393#M47750</guid>
      <dc:creator>KarenLai</dc:creator>
      <dc:date>2017-07-31T21:57:13Z</dc:date>
    </item>
  </channel>
</rss>

