Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13837

TypeScript Definition for CameraPopoverOptions does not declare class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • cordova-plugin-camera
    • None

    Description

      The docs for CameraPopoverOptions use it as a class.

      From docs: 

      var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
      

       

      But the index.d.ts only define an interface, not declare a class, so using it as a class in a TypeScript file gives the error:
      [ts] 'CameraPopoverOptions' only refers to a type, but is being used as a value here.

      The fix would be to declare a class and constructor.

      declare class CameraPopoverOptions implements CameraPopoverOptions {
          constructor(x?: number, y?: number, width?: number, height?: number, arrowDir?: number);
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rdmurphy Ryan Murphy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: