Commit 8ceb703
committed
Changes started but not yet complete. I added union handling in
Status: glue generation and BridgeJSLink logic still need more updates to fully support `undefinedOr`/optional types (many switches remain unhandled), and snapshots/tests haven’t been updated. The tree is in an intermediate state; please let me know if you want me to continue and finish the remaining plumbing and test updates.Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src/processor.js so T|null/T|undefined map to Optional<T>/JSUndefinedOr<T> (or JSUndefinedOr<Optional<T>>). Introduced Sources/JavaScriptKit/JSUndefinedOr.swift with JSValue conversions and bridging helpers delegating to Optional. Began enabling optionals for imports (removed unavailable stubs in BridgeJSIntrinsics.swift, added BridgeType.undefinedOr, mapped JSUndefinedOr in SwiftToSkeleton.swift, and partially updated ImportTS.swift and JSGlueGen.swift to accept optional/undefined-or types).1 parent 0662e3b commit 8ceb703
File tree
7 files changed
+646
-76
lines changed- Plugins/BridgeJS/Sources
- BridgeJSCore
- BridgeJSLink
- BridgeJSSkeleton
- TS2Swift/JavaScript/src
- Sources/JavaScriptKit
7 files changed
+646
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
1029 | 1027 | | |
1030 | 1028 | | |
1031 | 1029 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
136 | 160 | | |
137 | 161 | | |
138 | 162 | | |
| |||
0 commit comments