cordova-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/CB-13837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16697224#comment-16697224
] 

ASF GitHub Bot commented on CB-13837:
-------------------------------------

jcesarmobile opened a new pull request #379: CB-13837: fix TypeScript Definition for CameraPopoverOptions
URL: https://github.com/apache/cordova-plugin-camera/pull/379
 
 
   
   ### Platforms affected
   all
   
   ### 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](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
   - [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:
users@infra.apache.org


> 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


Mime
View raw message