Skip to content

Commit bcbeea0

Browse files
BridgeJS: Unify Swift type lookup logic between import/export (#517)
* BridgeJS: Unify Swift type lookup logic between import/export * BridgeJS: Index known JS types for type lookup
1 parent 2372235 commit bcbeea0

File tree

3 files changed

+137
-136
lines changed

3 files changed

+137
-136
lines changed

Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,29 +1674,6 @@ struct ProtocolCodegen {
16741674
}
16751675
}
16761676

1677-
extension BridgeType {
1678-
init?(swiftType: String) {
1679-
switch swiftType {
1680-
case "Int":
1681-
self = .int
1682-
case "Float":
1683-
self = .float
1684-
case "Double":
1685-
self = .double
1686-
case "String":
1687-
self = .string
1688-
case "Bool":
1689-
self = .bool
1690-
case "Void":
1691-
self = .void
1692-
case "JSObject":
1693-
self = .jsObject(nil)
1694-
default:
1695-
return nil
1696-
}
1697-
}
1698-
}
1699-
17001677
extension WasmCoreType {
17011678
var swiftType: String {
17021679
switch self {

0 commit comments

Comments
 (0)