feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -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>;
}