Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Property 'confidence' does not exist on type '{ label: string; confidence: string; } | undefined'

$
0
0

When I try to destructure the return type of the following function:

const coreml = async (  pathToImage: string,): Promise<{label: string; confidence: string} | undefined> => {  //body};

as such:

const {label, confidence} = await coreml(/*path to image*/);

I get

'confidence' is assigned a value but never used.eslint@typescript-eslint/no-unused-varsProperty 'confidence' does not exist on type '{ label: string; confidence: string; } | undefined'.

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>