You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2018/11/23 17:46:00 UTC

[jira] [Resolved] (CB-13837) TypeScript Definition for CameraPopoverOptions does not declare class

     [ 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org