+1
-1
@@ -40,7 +40,7 @@ describe('transformMetadataForComparison', () => {
|
||||
});
|
||||
|
||||
expect(result).toHaveProperty('key-123');
|
||||
expect(result['key-123']).toEqual({ id: 123, name: 'Test' });
|
||||
expect((result as Record<string, any>)['key-123']).toEqual({ id: 123, name: 'Test' });
|
||||
});
|
||||
|
||||
// Test with an empty array
|
||||
|
||||
-4
@@ -1,7 +1,3 @@
|
||||
export function orderObjectProperties<T extends object>(data: T[]): T[];
|
||||
|
||||
export function orderObjectProperties<T extends object>(data: T): T;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function orderObjectProperties<T extends Array<any> | object>(
|
||||
data: T,
|
||||
|
||||
-19
@@ -4,25 +4,6 @@ type TransformToString<T, Keys extends keyof T> = {
|
||||
[P in keyof T]: P extends Keys ? string : T[P];
|
||||
};
|
||||
|
||||
// Overload for an array of T
|
||||
export function transformMetadataForComparison<T, Keys extends keyof T>(
|
||||
fieldMetadataCollection: T[],
|
||||
options: {
|
||||
shouldIgnoreProperty?: (property: string, originalMetadata?: T) => boolean;
|
||||
propertiesToStringify?: readonly Keys[];
|
||||
keyFactory: (datum: T) => string;
|
||||
},
|
||||
): Record<string, TransformToString<T, Keys>>;
|
||||
|
||||
// Overload for a single T object
|
||||
export function transformMetadataForComparison<T, Keys extends keyof T>(
|
||||
fieldMetadataCollection: T,
|
||||
options: {
|
||||
shouldIgnoreProperty?: (property: string, originalMetadata?: T) => boolean;
|
||||
propertiesToStringify?: readonly Keys[];
|
||||
},
|
||||
): TransformToString<T, Keys>;
|
||||
|
||||
export function transformMetadataForComparison<T, Keys extends keyof T>(
|
||||
metadata: T[] | T,
|
||||
options: {
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
export function createDeterministicUuid(uuid: string): string;
|
||||
export function createDeterministicUuid(uuids: string[]): string;
|
||||
|
||||
export function createDeterministicUuid(
|
||||
uuidOrUuids: string[] | string,
|
||||
|
||||
Reference in New Issue
Block a user