simplify tools imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export default function omit<T extends Record<string, any>>(
|
||||
export const omit = <T extends Record<string, any>>(
|
||||
obj: T,
|
||||
propToRemove: keyof T,
|
||||
): Omit<T, typeof propToRemove> {
|
||||
): Omit<T, typeof propToRemove> => {
|
||||
const { [propToRemove]: _, ...rest } = obj;
|
||||
return rest;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user