From e053a18431605f7ce6322b2c765366877404e14a Mon Sep 17 00:00:00 2001 From: Reinos Date: Fri, 17 Nov 2023 10:06:51 +0100 Subject: [PATCH] Added TS generic --- index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2fea20a..43f85b5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,15 +1,15 @@ -export function diff (originalObj: object, updatedObj: object): object +export function diff(originalObj: T, updatedObj: T): Partial -export function addedDiff (originalObj: object, updatedObj: object): object +export function addedDiff(originalObj: T, updatedObj: T): Partial -export function deletedDiff (originalObj: object, updatedObj: object): object +export function deletedDiff(originalObj: T, updatedObj: T): Partial -export function updatedDiff (originalObj: object, updatedObj: object): object +export function updatedDiff(originalObj: T, updatedObj: T): Partial -export interface DetailedDiff { - added: object - deleted: object - updated: object +export interface DetailedDiff { + added: Partial + deleted: Partial + updated: Partial } -export function detailedDiff (originalObj: object, updatedObj: object): DetailedDiff +export function detailedDiff(originalObj: T, updatedObj: T): DetailedDiff