Page 1 of 1

JSDoc Function Prototype

PostPosted: Tue Mar 27, 2012 8:01 pm
by kwpsd
We have many instances where we expand the functionality of standard JavaScript class types...for example:

Code: Select all
    // Replicate a string 'n' number of times

    String.prototype.replicate = function( n )
    {
        return new Array( isNaN( n ) ? 1 : n++ ).join( this )
    }


All prototypes generate a similar warning:

The property replicate is undefined for the javascript type String.


What is the proper way to annotate this using JSDocs to get rid of the warnings?

Re: JSDoc Function Prototype

PostPosted: Thu Mar 29, 2012 6:56 pm
by kwpsd
Anyone? Servoy engineers (Paul, Johan, Joas, et al)?

I tried various combinations of the Servoy JSDoc tags to no avail. I need help with this!

Re: JSDoc Function Prototype

PostPosted: Fri Mar 30, 2012 9:39 am
by jcompagner
no this doesn't work in the the editor. It works fine at runtime but the editor doesn't know about prototyping, we have no support yet where you could register prototypes so that we know you enhanced the standard objects

Re: JSDoc Function Prototype

PostPosted: Fri Mar 30, 2012 7:23 pm
by kwpsd
Thanks for the explanation, Johan. Do I need to file a feature request for this, or is it already in the planning? If the latter, what is the expected release date?

Re: JSDoc Function Prototype

PostPosted: Sun Apr 01, 2012 5:19 pm
by jcompagner
don't know if there is a specific feature request for that already, i know we talked about it
When it is released is not yet known, because it is not planned at the moment, also it is part of a 3th party lib we are using, not directly servoy's own code.

Re: JSDoc Function Prototype

PostPosted: Tue Apr 03, 2012 1:27 am
by kwpsd
Request created: SVY-1949