Post

Swift/JS interop used to mean "JSObject", "JSValue", and runtime surprises. BridgeJS changes that: annotate your Swift, get typed glue code in both directions. Compile-time safe. Zero manual boilerplate. 🧵

Left side: Swift types with @​JS annotation. Right side: fully generated TypeScript interfaces and exports. You write @​JS. BridgeJS writes everything else.

Bridging options: 1. Annotate a Swift class or type with @​JS to create bindings for JS/TS code 2. Import an existing JavaScript class or function with @​JSClass or @​JSFunction on the Swift side 3. Or create a bridge-js.d.ts file to export TypeScript APIs to Swift

0 reposts3 likes