HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

Support of parameter objects #1315

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When describing the properties of the object in the function is very convenient 
to use the syntax with multiple use of the @param tag, but I noticed that GCC 
though not throws warnings in this syntax, but does not support it fully

/**
 * @param {{r: number}} params
 */
function foo(params) {

}

foo({r: 'd'}); // warning, all fine

/**
 * @param {!Object} params
 * @param {number} params.r
 */
function foo(params) {

}

foo({r: 'd'}); // fail, must be warning too

Original issue reported on code.google.com by kobez...@gmail.com on 23 Apr 2014 at 6:02

GoogleCodeExporter commented 9 years ago
Issue tracking has been migrated to github. Please make any further comments on 
this issue through https://github.com/google/closure-compiler/issues

Original comment by blic...@google.com on 1 May 2014 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by blic...@google.com on 1 May 2014 at 6:34