According to the API reference ScreenPoint | API Reference | ArcGIS API for JavaScript 4.3
In my custom widget I have a method that does something with a ScreenPoint. Below are two attempt at the method:
<SPAN class="keyword token">private</SPAN> <SPAN class="token function">_onPointerDown</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">:</SPAN>PointerEvent<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">const</SPAN> xyz<SPAN class="punctuation token">:</SPAN>Number <SPAN class="operator token">=</SPAN> <SPAN class="token function">Number</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">.</SPAN>x<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">const</SPAN> yy<SPAN class="punctuation token">:</SPAN>Number <SPAN class="operator token">=</SPAN> <SPAN class="token function">Number</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">.</SPAN>y<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">const</SPAN> screenPoint<SPAN class="punctuation token">:</SPAN>ScreenPoint <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ScreenPoint</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'esri.folder.className'</SPAN><SPAN class="punctuation token">,</SPAN> xyz<SPAN class="punctuation token">,</SPAN> yy<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// Errors at TSC with: Supplied parameters do not match any signature of call target.</SPAN>
<SPAN class="comment token">// but still transpiles successfully</SPAN>
<SPAN class="comment token">// do something with the screenPoint</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN> <SPAN class="keyword token">private</SPAN> <SPAN class="token function">_onPointerDown</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">:</SPAN>PointerEvent<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">const</SPAN> xyz<SPAN class="punctuation token">:</SPAN>Number <SPAN class="operator token">=</SPAN> <SPAN class="token function">Number</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">.</SPAN>x<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">const</SPAN> yy<SPAN class="punctuation token">:</SPAN>Number <SPAN class="operator token">=</SPAN> <SPAN class="token function">Number</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">.</SPAN>y<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">const</SPAN> screenPoint<SPAN class="punctuation token">:</SPAN>ScreenPoint <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ScreenPoint</SPAN><SPAN class="punctuation token">(</SPAN>xyz<SPAN class="punctuation token">,</SPAN> yy<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// Errors at TSC with: Supplied parameters do not match any signature of call target.</SPAN>
<SPAN class="comment token">// but still transpiles successfully</SPAN>
<SPAN class="comment token">// do something with the screenPoint</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Both tsx files expose this problem
'Error'message: 'Supplied parameters do not match any signature of call target.'
yet both compile to JavaScript the execute correctly.
In the name of a clean build, how can I remove that problem from my build?
TIA