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
@@ -6,7 +6,6 @@ import hasPrefix from './hasPrefix';
/**
* @name hexAddPrefix
* @signature hexAddPrefix (value: ?string): string
* @summary Adds the `0x` prefix to string values.
* @description
* Returns a `0x` prefixed string from the input value. If the input is already prefixed, it is returned unchanged.
@@ -19,7 +18,7 @@ import hasPrefix from './hasPrefix';
* console.log('With prefix', hexAddPrefix('0a0b12')); // => 0x0a0b12
* ```
*/
export default function hexAddPrefix (value: string | null | undefined): string {
export default function hexAddPrefix (value?: string | null): string {
if (value && hasPrefix(value)) {
return value;
}