◐ Shell
clean mode source ↗

Add ts2swift Record to Dictionary mapping by kateinoigakukun · Pull Request #582 · swiftwasm/JavaScriptKit

krodak

approved these changes Feb 5, 2026

Base automatically changed from katei/0bd3-bridgejs-support to main

February 5, 2026 10:49
…ript/src/processor.js`, mapping `Record<string, T>` to `[String: T]` (with JSObject fallback for non-string keys) by reading alias type arguments even when the type isn’t a `TypeReference`.

- Added a new fixture and refreshed Vitest snapshots to cover dictionary outputs, nested/optional records, array/object values, and unsupported key handling in `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/fixtures/RecordDictionary.d.ts` and `.../__snapshots__/ts2swift.test.js.snap`.

Tests: `cd Plugins/BridgeJS/Sources/TS2Swift/JavaScript && npm test -- --update`.