Skip to content

Commit 2e65d4b

Browse files
BridgeJS: Index known JS types for type lookup
1 parent 966daba commit 2e65d4b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugins/BridgeJS/Sources/BridgeJSCore/SwiftToSkeleton.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public final class SwiftToSkeleton {
2525
self.moduleName = moduleName
2626
self.exposeToGlobal = exposeToGlobal
2727
self.typeDeclResolver = TypeDeclResolver()
28+
29+
// Index known types provided by JavaScriptKit
30+
self.typeDeclResolver.addSourceFile("""
31+
@JSClass struct JSPromise {}
32+
""")
2833
}
2934

3035
public func addSourceFile(_ sourceFile: SourceFileSyntax, inputFilePath: String) {

0 commit comments

Comments
 (0)