From 10790049816321139ad27ea1b85e4ee3b1f0c882 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 23 Apr 2026 23:02:15 +0000 Subject: [PATCH] js-on-sx: typeof returns 'function' for callable-dicts + 'object' for null --- lib/js/runtime.sx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/js/runtime.sx b/lib/js/runtime.sx index e5aac187..72d0b735 100644 --- a/lib/js/runtime.sx +++ b/lib/js/runtime.sx @@ -467,7 +467,10 @@ ((= (type-of v) "number") "number") ((= (type-of v) "string") "string") ((= (type-of v) "lambda") "function") - ((= (type-of v) "native-fn") "function") + ((= (type-of v) "function") "function") + ((= (type-of v) "component") "function") + ((and (= (type-of v) "dict") (contains? (keys v) "__callable__")) + "function") (else "object")))) (define