Converts tests to TypeScript (#300)

This commit is contained in:
Jaco Greeff
2019-02-14 10:48:08 +01:00
committed by GitHub
parent 2a14a8b553
commit 1e6eb2c283
158 changed files with 89 additions and 183 deletions
+1 -2
View File
@@ -4,7 +4,6 @@
/**
* @name bufferToU8a
* @signature bufferToU8a (value?: Buffer): string
* @summary Creates a Uint8Array value from a Buffer object.
* @description
* `null` inputs returns an empty result, `Buffer` values return the actual value as a `Uint8Array`. Anything that is not a `Buffer` object throws an error.
@@ -17,7 +16,7 @@
* bufferToU8a(Buffer.from([1, 2, 3]));
* ```
*/
export default function bufferToU8a (buffer?: Buffer | number[]): Uint8Array {
export default function bufferToU8a (buffer?: Buffer | number[] | null): Uint8Array {
if (!buffer) {
return new Uint8Array([]);
}