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
@@ -20,7 +20,6 @@ try {
/**
* @name u8aToString
* @signature u8aToString (value?: UInt8Array): string
* @summary Creates a utf-8 string from a Uint8Array object.
* @description
* `UInt8Array` input values return the actual decoded utf-8 string. `null` or `undefined` values returns an empty string.
@@ -33,7 +32,7 @@ try {
* u8aToString(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f])); // hello
* ```
*/
export default function u8aToString (value?: Uint8Array): string {
export default function u8aToString (value?: Uint8Array | null): string {
if (!value || !value.length) {
return '';
}