Copilot commented on code in PR #6443:
URL: https://github.com/apache/texera/pull/6443#discussion_r3617709000


##########
frontend/src/app/common/util/predicate.ts:
##########
@@ -25,3 +25,14 @@
 export function isDefined<T>(val: T | undefined | null): val is T {
   return val !== undefined && val != null;
 }
+
+/**
+ * checks that the given value is a real object, guarding against the
+ * JavaScript quirk that `typeof null === "object"` (a bare `typeof`
+ * check would admit null).
+ * @param x
+ * @returns {boolean}
+ */

Review Comment:
   The JSDoc for `isNonNullObject` says “real object”, but the implementation 
is specifically a `typeof x === "object"` + non-null check (arrays and class 
instances pass; functions don’t). Consider tightening the wording so callers 
don’t assume it’s a “plain object” predicate.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to