◐ Shell
clean mode source ↗

BridgeJS: Improve diagnostics and fix-its for macros by kateinoigakukun · Pull Request #597 · swiftwasm/JavaScriptKit

Examples added/covered in this change:
- @JSFunction: enforce throws(JSException) (missing or wrong type) with note + fix-it ("Declare throws(JSException)").
- @JSFunction: instance members outside @jsclass emit a clear diagnostic.
- @JSGetter/@JSSetter: members (instance/static/class) outside @jsclass emit a clear diagnostic.
- @JSSetter: invalid setter names (e.g. updateFoo) emit a diagnostic and suggest a rename fix-it (e.g. setFoo).
- @JSSetter: missing value parameter emits a diagnostic and suggests adding a placeholder parameter.
- @jsclass: using @jsclass on non-struct declarations emits a diagnostic; for "class" also suggests "Change 'class' to 'struct'".

krodak

approved these changes Feb 6, 2026

@krodak krodak deleted the katei/b443-bridgejs-macros branch

February 6, 2026 08:58