@@ -399,7 +399,14 @@ export class TypeProcessor {
399399 this . swiftLines . push ( ` case ${ this . renderIdentifier ( name ) } = "${ raw . replaceAll ( "\"" , "\\\\\"" ) } "` ) ;
400400 }
401401 this . swiftLines . push ( "}" ) ;
402- this . swiftLines . push ( `extension ${ swiftEnumName } : _BridgedSwiftEnumNoPayload {}` ) ;
402+ this . swiftLines . push ( `extension ${ swiftEnumName } : _BridgedSwiftEnumNoPayload {` ) ;
403+ this . swiftLines . push ( ` @_spi(BridgeJS) public static func bridgeJSLiftParameter() -> Self {` ) ;
404+ this . swiftLines . push ( ` Self(rawValue: String.bridgeJSLiftParameter())!` ) ;
405+ this . swiftLines . push ( ` }` ) ;
406+ this . swiftLines . push ( ` @_spi(BridgeJS) public consuming func bridgeJSLowerStackReturn() {` ) ;
407+ this . swiftLines . push ( ` rawValue.bridgeJSLowerStackReturn()` ) ;
408+ this . swiftLines . push ( ` }` ) ;
409+ this . swiftLines . push ( `}` ) ;
403410 this . swiftLines . push ( "" ) ;
404411 return ;
405412 }
@@ -410,7 +417,14 @@ export class TypeProcessor {
410417 this . swiftLines . push ( ` case ${ this . renderIdentifier ( name ) } = ${ raw } ` ) ;
411418 }
412419 this . swiftLines . push ( "}" ) ;
413- this . swiftLines . push ( `extension ${ swiftEnumName } : _BridgedSwiftEnumNoPayload {}` ) ;
420+ this . swiftLines . push ( `extension ${ swiftEnumName } : _BridgedSwiftEnumNoPayload {` ) ;
421+ this . swiftLines . push ( ` @_spi(BridgeJS) public static func bridgeJSLiftParameter() -> Self {` ) ;
422+ this . swiftLines . push ( ` Self(rawValue: Int.bridgeJSLiftParameter())!` ) ;
423+ this . swiftLines . push ( ` }` ) ;
424+ this . swiftLines . push ( ` @_spi(BridgeJS) public consuming func bridgeJSLowerStackReturn() {` ) ;
425+ this . swiftLines . push ( ` rawValue.bridgeJSLowerStackReturn()` ) ;
426+ this . swiftLines . push ( ` }` ) ;
427+ this . swiftLines . push ( `}` ) ;
414428 this . swiftLines . push ( "" ) ;
415429 return ;
416430 }
0 commit comments