@@ -1470,6 +1470,9 @@ public struct BridgeJSLink {
14701470 case . namespaceEnum:
14711471 return enumDef. tsFullPath
14721472 default :
1473+ if enumDef. emitStyle == . tsEnum {
1474+ return enumDef. tsFullPath
1475+ }
14731476 return " \( enumDef. tsFullPath) Tag "
14741477 }
14751478 }
@@ -1786,7 +1789,7 @@ public struct BridgeJSLink {
17861789 ]
17871790 for (associatedValueIndex, associatedValue) in enumCase. associatedValues. enumerated ( ) {
17881791 let prop = associatedValue. label ?? " param \( associatedValueIndex) "
1789- fields. append ( " \( prop) : \( associatedValue. type. tsType ) " )
1792+ fields. append ( " \( prop) : \( resolveTypeScriptType ( associatedValue. type) ) " )
17901793 }
17911794 unionParts. append ( " { \( fields. joined ( separator: " ; " ) ) } " )
17921795 }
@@ -2917,6 +2920,7 @@ extension BridgeJSLink {
29172920 depth: 1 ,
29182921 printer: printer,
29192922 exposeToGlobal: true ,
2923+ exportedSkeletons: exportedSkeletons,
29202924 renderTSSignatureCallback: renderTSSignatureCallback
29212925 )
29222926 printer. unindent ( )
@@ -2935,6 +2939,7 @@ extension BridgeJSLink {
29352939 depth: 1 ,
29362940 printer: printer,
29372941 exposeToGlobal: false ,
2942+ exportedSkeletons: exportedSkeletons,
29382943 renderTSSignatureCallback: renderTSSignatureCallback
29392944 )
29402945 }
@@ -2948,6 +2953,7 @@ extension BridgeJSLink {
29482953 depth: Int ,
29492954 printer: CodeFragmentPrinter ,
29502955 exposeToGlobal: Bool ,
2956+ exportedSkeletons: [ ExportedSkeleton ] ,
29512957 renderTSSignatureCallback: @escaping ( [ Parameter ] , BridgeType , Effects ) -> String
29522958 ) {
29532959 func hasContent( node: NamespaceNode ) -> Bool {
@@ -3102,7 +3108,9 @@ extension BridgeJSLink {
31023108 . enumerated ( )
31033109 {
31043110 let prop = associatedValue. label ?? " param \( associatedValueIndex) "
3105- fields. append ( " \( prop) : \( associatedValue. type. tsType) " )
3111+ fields. append (
3112+ " \( prop) : \( BridgeJSLink . resolveTypeScriptType ( associatedValue. type, exportedSkeletons: exportedSkeletons) ) "
3113+ )
31063114 }
31073115 unionParts. append ( " { \( fields. joined ( separator: " ; " ) ) } " )
31083116 }
@@ -3136,6 +3144,7 @@ extension BridgeJSLink {
31363144 depth: depth + 1 ,
31373145 printer: printer,
31383146 exposeToGlobal: exposeToGlobal,
3147+ exportedSkeletons: exportedSkeletons,
31393148 renderTSSignatureCallback: renderTSSignatureCallback
31403149 )
31413150
0 commit comments