amend comments, remove return type from Dish translate
This commit is contained in:
parent
90dd7037c8
commit
aa9bf08157
@ -370,7 +370,7 @@ class Dish {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert this.value to a ByteArray
|
* Convert this.value to an ArrayBuffer
|
||||||
*
|
*
|
||||||
* If running in a browser, _toByteArray is asynchronous.
|
* If running in a browser, _toByteArray is asynchronous.
|
||||||
*
|
*
|
||||||
@ -404,14 +404,14 @@ class Dish {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return toByteArrayFuncs[Utils.isNode() && "node" || "browser"][this.type]();
|
toByteArrayFuncs[Utils.isNode() && "node" || "browser"][this.type]();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new DishError(`Error translating from ${Dish.enumLookup(this.type)} to ArrayBuffer: ${err}`);
|
throw new DishError(`Error translating from ${Dish.enumLookup(this.type)} to ArrayBuffer: ${err}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert this.value to the given type.
|
* Convert this.value to the given type from ArrayBuffer
|
||||||
*
|
*
|
||||||
* @param {number} toType - the Dish enum to convert to
|
* @param {number} toType - the Dish enum to convert to
|
||||||
* @param {boolean} [notUTF8=false] - Do not treat strings as UTF8.
|
* @param {boolean} [notUTF8=false] - Do not treat strings as UTF8.
|
||||||
|
Loading…
Reference in New Issue
Block a user