Skip to content

Commit

Permalink
perf: remove BlacklistedRecordProps
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed May 14, 2024
1 parent 83d7620 commit da465e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
23 changes: 6 additions & 17 deletions src/types/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ export type DeepMergeMergeFunctionsDefaultURIs = Readonly<{
DeepMergeOthersURI: DeepMergeLeafURI;
}>;

/**
* A union of all the props that should not be included in type information for
* merged records.
*/
type BlacklistedRecordProps = "__proto__";

/**
* Deep merge records.
*/
Expand All @@ -61,12 +55,7 @@ export type DeepMergeRecordsDefaultHKT<
M,
> =
Ts extends Readonly<readonly [unknown, ...Readonly<ReadonlyArray<unknown>>]>
? FlatternAlias<
Omit<
DeepMergeRecordsDefaultHKTInternalProps<Ts, MF, M>,
BlacklistedRecordProps
>
>
? FlatternAlias<DeepMergeRecordsDefaultHKTInternalProps<Ts, MF, M>>
: {};

/**
Expand Down Expand Up @@ -175,35 +164,35 @@ export type GetDeepMergeMergeFunctionsURIs<
> = Readonly<{
// prettier-ignore
DeepMergeRecordsURI:

PMF["DeepMergeRecordsURI"] extends keyof DeepMergeMergeFunctionURItoKind<any, any, any>
? PMF["DeepMergeRecordsURI"]
: DeepMergeRecordsDefaultURI;

// prettier-ignore
DeepMergeArraysURI:

PMF["DeepMergeArraysURI"] extends keyof DeepMergeMergeFunctionURItoKind<any, any, any>
? PMF["DeepMergeArraysURI"]
: DeepMergeArraysDefaultURI;

// prettier-ignore
DeepMergeSetsURI:

PMF["DeepMergeSetsURI"] extends keyof DeepMergeMergeFunctionURItoKind<any, any, any>
? PMF["DeepMergeSetsURI"]
: DeepMergeSetsDefaultURI;

// prettier-ignore
DeepMergeMapsURI:

PMF["DeepMergeMapsURI"] extends keyof DeepMergeMergeFunctionURItoKind<any, any, any>
? PMF["DeepMergeMapsURI"]
: DeepMergeMapsDefaultURI;

// prettier-ignore
DeepMergeOthersURI:

PMF["DeepMergeOthersURI"] extends keyof DeepMergeMergeFunctionURItoKind<any, any, any>
? PMF["DeepMergeOthersURI"]
: DeepMergeLeafURI;
Expand Down
1 change: 0 additions & 1 deletion src/types/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export type DeepMergeMergeFunctionUtils<
/**
* The utils provided to the merge functions.
*/

export type DeepMergeMergeIntoFunctionUtils<
in out M,
MM extends DeepMergeBuiltInMetaData = DeepMergeBuiltInMetaData,
Expand Down

0 comments on commit da465e4

Please sign in to comment.