nodeca / pako

high speed zlib port to javascript, works in browser & node.js

Home Page:http://nodeca.github.io/pako/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect JSDoc type information for optional parameters

BribeFromTheHive opened this issue · comments

commented

Hi,

In functions such as gzip, the type information on the second parameter is not formatted for JSDoc. When using a TypeScript environment, it asks for the second parameter to be fulfilled. Please either add options={} syntax so that the function header recognizes the optional nature of the second parameter, or use JSDoc notation so they are declared accordingly:

/**
 * @param {Uint8Array|ArrayBuffer|string} data
 * @param {object} [options]
*/