>
> On 6/2/15, 11:45 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote:
>
> >I think the best solution, 'goog' safe, would be to define the field on
> >the
> >prototype (with all the proper JSDoc annotations) and then initialize it
> >in
> >the constructor.
>
> Works for me as well.  Can you confirm that Google Closure doesn’t really
> care?  I feel like I got bit by  the Linter wanting @private jsdoc to have
> a variable name that ends with “_” if it was on the prototype, or some
> silly rule like that.  But on the other hand, we won’t be linting the
> output.  But I don’t want it to fool Google Closure Compiler.
>

The linter - which is from Google as well - is just enforcing a coding
convention. The underscore is not needed to 'declare' a field private. The
JSDoc annotation does that.

You can add an argument to the linter telling it to ignore the missing
underscore.

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Reply via email to