Docs/types: add Promise<T> and Array<T> #472

Changelog updates and version bump of devDeps
This commit is contained in:
Lovell Fuller
2016-11-17 19:50:19 +00:00
parent 6ccccf8c39
commit effa77afee
13 changed files with 113 additions and 54 deletions

View File

@@ -16,7 +16,7 @@ const sharp = require('../build/Release/sharp.node');
* @param {String} fileOut - the path to write the image data to.
* @param {Function} [callback] - called on completion with two arguments `(err, info)`.
* `info` contains the output image `format`, `size` (bytes), `width`, `height` and `channels`.
* @returns {Promise} - when no callback is provided
* @returns {Promise<Object>} - when no callback is provided
* @throws {Error} Invalid parameters
*/
const toFile = function toFile (fileOut, callback) {
@@ -53,7 +53,7 @@ const toFile = function toFile (fileOut, callback) {
* A Promises/A+ promise is returned when `callback` is not provided.
*
* @param {Function} [callback]
* @returns {Promise} - when no callback is provided
* @returns {Promise<Buffer>} - when no callback is provided
*/
const toBuffer = function toBuffer (callback) {
return this._pipeline(callback);