[ https://issues.apache.org/jira/browse/CB-13837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16697392#comment-16697392 ]
ASF subversion and git services commented on CB-13837: ------------------------------------------------------ Commit 86b0bf2534a8d22e582437b30f57a0fad870471d in cordova-plugin-camera's branch refs/heads/master from [~jcesarmobile] [ https://gitbox.apache.org/repos/asf?p=cordova-plugin-camera.git;h=86b0bf2 ] CB-13837: fix TypeScript Definition for CameraPopoverOptions (#379) > 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-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org