When you call
```
const singleValue = convertToSingleValueData({
indexRange: [0, 0],
mappings: { x: { type: 'undefined', types: undefined } },
}, 0,{ x: undefined } "x", true);
if (single.value === undefined) // ESLint: Unnecessary conditional, the types have no overlap.(@typescript-eslint/no-unnecessary-condition)
Result of `convertToSingleValueData` looks like:
export interface SingleValueData {
/** The dimension identifier */
dimension: string;
/** The value for the dimension */
value: string | number;
/** The timeseries for the sparkline */
timeseries?: TimeseriesWithDimensions[];
}
value is typed as a string or number, however is not true, and it might be undefined as well.
Solved! Go to Solution.
Hello, thank you for pointing it out. We will check it and fix it.