Can't find the variable "data" of the readme
kriefsacha opened this issue · 2 comments
Hi, the detection event problem seems to be fixed with the alpha 4.
I just have an issue, the readme says:
onDetection(event: DetectionEvent){
if(event.type === DetectionType.Barcode){
const barcode: BarcodeResult = data;
}
But where data comes from ?
If i try to do = event.data it tells me that i cant because event.data is type [key:string].
Thank you
Please install the firebase and mlkit plugins with the @alpha
tag w/o the tag it will pull the latest which is unfortunately the first published alpha
@triniwiz I still have the problem with the last one (which i had to install manually btw, i tried alpha tag didnt work and when i tried without any tag or with @latest it was giving me the alpha0 , so i manually wrote alpha5), when i puted as in the readme
const barcode: BarcodeResult[] = event.data;
i got this error:
Type '{ [key: string]: any; } | { [key: string]: any; }[]' is not assignable to type 'BarcodeResult[]'.
Type '{ [key: string]: any; }' is missing the following properties from type 'BarcodeResult[]': length, pop, push, concat