LarryBattle / Ratio.js

Rational numbers for Javascript
http://larrybattle.github.com/Ratio.js/
MIT License
113 stars 9 forks source link

Incorrect usage of JSDoc props #76

Open LarryBattle opened 9 years ago

LarryBattle commented 9 years ago

Running the Ratio-*.js through the Google closure compiler with advanced selected, will output 100+ errors. Most of them deal with incorrect usage of JSDoc props.

Please fix these warnings.

Sample output:

JSC_TYPE_MISMATCH: actual parameter 1 of Ratio.getStandardRatioArray does not match formal parameter
found   : (Number|Ratio|String|null|undefined)
required: (Number|null) at line 32 character 44
      var arr = Ratio.getStandardRatioArray(numerator, denominator, this.alwa...
                                            ^
JSC_TYPE_MISMATCH: actual parameter 2 of Ratio.getStandardRatioArray does not match formal parameter
found   : (Number|Ratio|String|null|undefined)
required: (Number|null) at line 32 character 55
      var arr = Ratio.getStandardRatioArray(numerator, denominator, this.alwa...
                                                       ^
JSC_TYPE_MISMATCH: actual parameter 3 of Ratio.getStandardRatioArray does not match formal parameter
found   : boolean
required: (Boolean|null) at line 32 character 68
      var arr = Ratio.getStandardRatioArray(numerator, denominator, this.alwa...
                                                                    ^
JSC_TYPE_MISMATCH: assignment to property MAX_PRECISION of Ratio
found   : number
required: (Number|null) at line 44 character 4
    Ratio.MAX_PRECISION = (1 / 3).toString().length - 2;
    ^

Link: