javascript - js-doc / google-closure-compiler how to document passed enum object itself? -


e.g.

/**  * super enum  * @enum {number}  */ myenum = {     one: 1,     two: 2 };  /**  * @param {what type it?} enumobj  */ function showenum(enumobj) {   console.log(enumobj); }  //show enum definition object showenum(myenum); 

how describe parameter type not value/instance of myenum, myenum object itself?

use !myenum ! means "non-null".

/** * @param {!myenum} enumobj */ function showenum(enumobj) {   console.log(enumobj); } 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -