import { ErrorCode } from "jm-castle-types"; export function without>( obj: T, ...toDelete: Array ) { const newObj = obj; toDelete.forEach((k) => delete newObj[k]); return newObj; } export class ErrorWithCode extends Error { constructor(code: ErrorCode, message: string) { super(message); this.code = code; } public code: ErrorCode; }