cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13837) TypeScript Definition for CameraPopoverOptions does not declare class
Date Fri, 23 Nov 2018 14:45:00 GMT


ASF GitHub Bot commented on CB-13837:

jcesarmobile opened a new pull request #379: CB-13837: fix TypeScript Definition for CameraPopoverOptions
   ### Platforms affected
   ### What does this PR do?
   Fix TypeScript Definition for CameraPopoverOptions
   ### What testing has been done on this change?
   Used in a TypeScript project and see that linter didn't complain after the change
   ### Checklist
   - [x] [Reported an issue]( in the JIRA
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
   - [ ] Added automated test coverage as appropriate for this change.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> TypeScript Definition for CameraPopoverOptions does not declare class
> ---------------------------------------------------------------------
>                 Key: CB-13837
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message