Skip to content

Incorrect usage of JSDoc props #76

@LarryBattle

Description

@LarryBattle

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions