Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
supermacro committed Feb 25, 2021
1 parent a5e66a8 commit 6a6cd86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type ExtractErrAsyncTypes<T extends readonly ResultAsync<unknown, unknown>[]> =
[idx in keyof T]: T[idx] extends ResultAsync<unknown, infer E> ? E : never
}


const appendValueToEndOfList = <T>(value: T) => (list: T[]): T[] => {
// need to wrap `value` inside of an array in order to prevent
// Array.prototype.concat from destructuring the contents of `value`
Expand All @@ -30,7 +29,7 @@ const appendValueToEndOfList = <T>(value: T) => (list: T[]): T[] => {
// Otherwise you will receive [ 'hi', 1, 2, 3 ]
// when you actually expected a tuple containing [ 'hi', [ 1, 2, 3 ] ]
if (Array.isArray(value)) {
return list.concat([ value ])
return list.concat([value])
}

return list.concat(value)
Expand Down

0 comments on commit 6a6cd86

Please sign in to comment.