[
https://issues.apache.org/jira/browse/CB-13837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jcesarmobile resolved CB-13837.
-------------------------------
Resolution: Fixed
Fixed in 4.1.0-dev
> TypeScript Definition for CameraPopoverOptions does not declare class
> ---------------------------------------------------------------------
>
> Key: CB-13837
> URL: https://issues.apache.org/jira/browse/CB-13837
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-camera
> Reporter: Ryan Murphy
> Priority: Minor
>
> The docs for CameraPopoverOptions use it as a class.
> From docs:
> {code:javascript}
> var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100,
> Camera.PopoverArrowDirection.ARROW_ANY);
> {code}
>
> 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:
> {color:#ff0000}[ts] 'CameraPopoverOptions' only refers to a type, but is
> being used as a value here.{color}
> The fix would be to declare a class and constructor.
> {code:java}
> declare class CameraPopoverOptions implements CameraPopoverOptions {
> constructor(x?: number, y?: number, width?: number, height?: number,
> arrowDir?: number);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]