@studnicky/v8/delete-property
delete obj.prop permanently transitions the object from fast (hidden-class) mode to dictionary mode. Once in dictionary mode, all subsequent property accesses on that object are slower, including accesses to properties that were never deleted.
Fixable: No · Options: No · Suggested severity: error
✗ Incorrect
ts
delete cache[key];
delete user.tempField;✓ Correct
ts
// Set to undefined to preserve the hidden class
cache[key] = undefined;ts
// Use Map.delete() — Map is designed for dynamic key removal
map.delete(key);