Add (name :as type) annotation syntax for defcomp params
parse-comp-params now recognizes (name :as type) — a 3-element list with :as keyword separator. Type annotations are stored on the Component via component-param-types and used by types.sx for call-site checking. Unannotated params default to any. 428/428 tests pass (50 types tests including 6 annotation tests). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,8 @@ class PyEmitter:
|
||||
"component-has-children?": "component_has_children",
|
||||
"component-name": "component_name",
|
||||
"component-affinity": "component_affinity",
|
||||
"component-param-types": "component_param_types",
|
||||
"component-set-param-types!": "component_set_param_types",
|
||||
"macro-params": "macro_params",
|
||||
"macro-rest-param": "macro_rest_param",
|
||||
"macro-body": "macro_body",
|
||||
|
||||
Reference in New Issue
Block a user