<?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: SingleValueData.value might be undefined in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/SingleValueData-value-might-be-undefined/m-p/224922#M540</link>
    <description>&lt;P&gt;Hello, thank you for pointing it out. We will check it and fix it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 07:12:50 GMT</pubDate>
    <dc:creator>michalbrabec</dc:creator>
    <dc:date>2023-10-10T07:12:50Z</dc:date>
    <item>
      <title>SingleValueData.value might be undefined</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/SingleValueData-value-might-be-undefined/m-p/224540#M528</link>
      <description>&lt;P&gt;When you call&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const singleValue = convertToSingleValueData&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;{&lt;BR /&gt;  indexRange: [0, 0],&lt;BR /&gt;  mappings: { x: { type: 'undefined', types: undefined } },&lt;BR /&gt;}&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,{ x: undefined }&lt;/SPAN&gt; &lt;SPAN&gt;"x"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;if (single.value === undefined) // ESLint: Unnecessary conditional, the types have no overlap.(@typescript-eslint/no-unnecessary-condition)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Result of `convertToSingleValueData` looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;export interface &lt;/SPAN&gt;&lt;SPAN&gt;SingleValueData &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;/** The dimension identifier */&lt;BR /&gt;&lt;/SPAN&gt;    dimension&lt;SPAN&gt;: string&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;/** The value for the dimension */&lt;BR /&gt;&lt;/SPAN&gt;    value&lt;SPAN&gt;: string | number&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;/** The timeseries for the sparkline */&lt;BR /&gt;&lt;/SPAN&gt;    timeseries&lt;SPAN&gt;?: &lt;/SPAN&gt;&lt;SPAN&gt;TimeseriesWithDimensions&lt;/SPAN&gt;&lt;SPAN&gt;[];&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;value is typed as a string or number, however is not true, and it might be undefined as well.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:41:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/SingleValueData-value-might-be-undefined/m-p/224540#M528</guid>
      <dc:creator>beigert</dc:creator>
      <dc:date>2023-10-04T08:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: SingleValueData.value might be undefined</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/SingleValueData-value-might-be-undefined/m-p/224922#M540</link>
      <description>&lt;P&gt;Hello, thank you for pointing it out. We will check it and fix it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 07:12:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/SingleValueData-value-might-be-undefined/m-p/224922#M540</guid>
      <dc:creator>michalbrabec</dc:creator>
      <dc:date>2023-10-10T07:12:50Z</dc:date>
    </item>
  </channel>
</rss>

