mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
feat: migrate to esm
This commit is contained in:
@@ -16,8 +16,11 @@
|
||||
/**
|
||||
* Returns a new object without the specified keys.
|
||||
*/
|
||||
export function omit<T extends object, U extends keyof T>(object: T, ...keys: U[]): Omit<T, U> {
|
||||
const out = {...object};
|
||||
export function omit<T extends object, U extends keyof T>(
|
||||
object: T,
|
||||
...keys: U[]
|
||||
): Omit<T, U> {
|
||||
const out = { ...object };
|
||||
for (const key of keys) delete out[key];
|
||||
return out as Exclude<T, U>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user