Skip to content

Commit ffb1a13

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

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Plugins/BridgeJS/Sources/BridgeJSCore/SwiftToSkeleton.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ 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+
"""
32+
@JSClass struct JSPromise {}
33+
"""
34+
)
2835
}
2936

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

0 commit comments

Comments
 (0)