refactor: remove bySelf method

pull/3320/head
Arman Ozak 6 years ago
parent 007421aae1
commit 25204e5d34

@ -12,8 +12,4 @@ export class TrackByService<ItemType = any> {
byDeep<T = ItemType>(...keys: T extends object ? O.Paths<T> : never): TrackByFunction<T> {
return (_, item) => keys.reduce((acc, key) => acc[key], item);
}
bySelf<T = ItemType>(): TrackByFunction<T> {
return (_, item) => item;
}
}

@ -18,10 +18,4 @@ describe('TrackByService', () => {
expect(service.byDeep<typeof obj>('a', 'b', 'c', 'x')(284, obj)).toBe(1036);
});
});
describe('#bySelf', () => {
it('should return a function which tracks the item', () => {
expect(service.bySelf()(284, 'X')).toBe('X');
});
});
});

Loading…
Cancel
Save