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'.