Skip to content

Commit

Permalink
chore(release): 4.0.3 [skip ci]
Browse files Browse the repository at this point in the history
## [4.0.3](v4.0.2...v4.0.3) (2022-04-06)

### Bug Fixes

* use explict return types for function that return a HKT ([eb4183e](eb4183e)), closes [#94](#94)
  • Loading branch information
semantic-release-bot committed Apr 6, 2022
1 parent 93d09cc commit d4d0605
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file. Dates are displayed in UTC.

## [4.0.3](https://github.com/RebeccaStevens/deepmerge-ts/compare/v4.0.2...v4.0.3) (2022-04-06)


### Bug Fixes

* use explict return types for function that return a HKT ([eb4183e](https://github.com/RebeccaStevens/deepmerge-ts/commit/eb4183e5441ea8b36bbb8f24ffa38ba850eb389c)), closes [#94](https://github.com/RebeccaStevens/deepmerge-ts/issues/94)

## [4.0.2](https://github.com/RebeccaStevens/deepmerge-ts/compare/v4.0.1...v4.0.2) (2022-03-31)


Expand Down
12 changes: 8 additions & 4 deletions dist/deno/deepmerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ function defaultMergeRecords<
MF extends DeepMergeMergeFunctionsURIs,
M,
MM extends DeepMergeBuiltInMetaData
>(values: Ts, utils: U, meta: M | undefined) {
>(
values: Ts,
utils: U,
meta: M | undefined
): DeepMergeRecordsDefaultHKT<Ts, MF, M> {
const result: Record<PropertyKey, unknown> = {};

/* eslint-disable functional/no-loop-statement, functional/no-conditional-statement -- using a loop here is more performant. */
Expand Down Expand Up @@ -464,7 +468,7 @@ function defaultMergeArrays<
Ts extends ReadonlyArray<ReadonlyArray<unknown>>,
MF extends DeepMergeMergeFunctionsURIs,
M
>(values: Ts) {
>(values: Ts): DeepMergeArraysDefaultHKT<Ts, MF, M> {
return values.flat() as DeepMergeArraysDefaultHKT<Ts, MF, M>;
}

Expand All @@ -475,7 +479,7 @@ function defaultMergeArrays<
*/
function defaultMergeSets<
Ts extends ReadonlyArray<Readonly<ReadonlySet<unknown>>>
>(values: Ts) {
>(values: Ts): DeepMergeSetsDefaultHKT<Ts> {
return new Set(getIterableOfIterables(values)) as DeepMergeSetsDefaultHKT<Ts>;
}

Expand All @@ -486,7 +490,7 @@ function defaultMergeSets<
*/
function defaultMergeMaps<
Ts extends ReadonlyArray<Readonly<ReadonlyMap<unknown, unknown>>>
>(values: Ts) {
>(values: Ts): DeepMergeMapsDefaultHKT<Ts> {
return new Map(getIterableOfIterables(values)) as DeepMergeMapsDefaultHKT<Ts>;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/node/types/current/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ declare function defaultMergeRecords<Ts extends ReadonlyArray<Record<PropertyKey
*
* @param values - The arrays.
*/
declare function defaultMergeArrays<Ts extends ReadonlyArray<ReadonlyArray<unknown>>, MF extends DeepMergeMergeFunctionsURIs, M>(values: Ts): Ts extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? Rest extends readonly [infer Head, ...infer Rest] ? Head extends readonly unknown[] ? Rest extends readonly [readonly unknown[], ...(readonly unknown[])[]] ? any : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head, ...Head] : never : never : [...Head, ...Head, ...Head] : never : never : [...Head, ...Head] : never : never : [...Head] : never : never;
declare function defaultMergeArrays<Ts extends ReadonlyArray<ReadonlyArray<unknown>>, MF extends DeepMergeMergeFunctionsURIs, M>(values: Ts): DeepMergeArraysDefaultHKT<Ts, MF, M>;
/**
* The default strategy to merge sets.
*
Expand Down

0 comments on commit d4d0605

Please sign in to comment.