Skip to content

Import TextDetections error #10

@nodescan-admin

Description

@nodescan-admin

Describe the bug
Importing TextDetections showed the (lint) error ' TextDetections not found in @capacitor-community/image-to-text' import/named'

To Reproduce
Import as described in the Read Me in a Vuejs/Quasar project

Expected behavior
Expected to be able to use the example.

Desktop (please complete the following information):
Mac OS 14.2, Visual Studio Code

Additional context

**This works:**
import { Ocr } from '@capacitor-community/image-to-text'
import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'

async function scanOCR() {
  const photo = await Camera.getPhoto({
    quality: 90,
    allowEditing: true,
    resultType: CameraResultType.Uri,
    source: CameraSource.Camera
  })

  const data: Ocr.TextDetections = await Ocr.detectText({ filename: photo.path })
  for (const detection of data.textDetections) {
    console.log(detection.text)
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions