errors.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829
  1. declare const errors: {
  2. readonly 0: "Illegal state";
  3. readonly 1: "Immer drafts cannot have computed properties";
  4. readonly 2: "This object has been frozen and should not be mutated";
  5. readonly 3: (data: any) => string;
  6. readonly 4: "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.";
  7. readonly 5: "Immer forbids circular references";
  8. readonly 6: "The first or second argument to `produce` must be a function";
  9. readonly 7: "The third argument to `produce` must be a function or undefined";
  10. readonly 8: "First argument to `createDraft` must be a plain object, an array, or an immerable object";
  11. readonly 9: "First argument to `finishDraft` must be a draft returned by `createDraft`";
  12. readonly 10: "The given draft is already finalized";
  13. readonly 11: "Object.defineProperty() cannot be used on an Immer draft";
  14. readonly 12: "Object.setPrototypeOf() cannot be used on an Immer draft";
  15. readonly 13: "Immer only supports deleting array indices";
  16. readonly 14: "Immer only supports setting array indices and the 'length' property";
  17. readonly 15: (path: string) => string;
  18. readonly 16: "Sets cannot have \"replace\" patches.";
  19. readonly 17: (op: string) => string;
  20. readonly 18: (plugin: string) => string;
  21. readonly 20: "Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available";
  22. readonly 21: (thing: string) => string;
  23. readonly 22: (thing: string) => string;
  24. readonly 23: (thing: string) => string;
  25. readonly 24: "Patching reserved attributes like __proto__, prototype and constructor is not allowed";
  26. };
  27. export declare function die(error: keyof typeof errors, ...args: any[]): never;
  28. export {};
  29. //# sourceMappingURL=errors.d.ts.map