(a: any, b: any)
| 1077 | } |
| 1078 | |
| 1079 | function areValuesEqual(a: any, b: any): boolean { |
| 1080 | // Simple equality check - could be enhanced for deep object comparison |
| 1081 | if (a === b) { |
| 1082 | return true |
| 1083 | } |
| 1084 | |
| 1085 | // Handle NaN |
| 1086 | if (typeof a === `number` && typeof b === `number` && isNaN(a) && isNaN(b)) { |
| 1087 | return true |
| 1088 | } |
| 1089 | |
| 1090 | // Handle Date objects |
| 1091 | if (a instanceof Date && b instanceof Date) { |
| 1092 | return a.getTime() === b.getTime() |
| 1093 | } |
| 1094 | |
| 1095 | // For arrays and objects, use reference equality |
| 1096 | // (In practice, we don't need deep equality for these cases - |
| 1097 | // same object reference means same value for our use case) |
| 1098 | if ( |
| 1099 | typeof a === `object` && |
| 1100 | typeof b === `object` && |
| 1101 | a !== null && |
| 1102 | b !== null |
| 1103 | ) { |
| 1104 | return a === b |
| 1105 | } |
| 1106 | |
| 1107 | return false |
| 1108 | } |
| 1109 | |
| 1110 | function areRefsEqual(a: PropRef, b: PropRef): boolean { |
| 1111 | if (a.path.length !== b.path.length) { |
no outgoing calls
no test coverage detected