◐ Shell
clean mode source ↗

BridgeJS: Support case enums as imported function parameters and returns by krodak · Pull Request #756 · swiftwasm/JavaScriptKit

Case enums (enums without raw values or associated values) already bridged
across the export boundary as their Int32 tag, but the TypeScript import path
rejected them with "Enum types are not yet supported in TypeScript imports".
The JS glue already round-trips the tag in both directions, so enable case
enums as imported (@JSFunction) parameters and return values by lowering and
lifting that Int32 tag in the import context, matching the export side.

Adds a CaseEnumImports round-trip test and an EnumCaseImport codegen snapshot.

kateinoigakukun