-
-
Notifications
You must be signed in to change notification settings - Fork 633
Expand file tree
/
Copy pathJSExport.ejs
More file actions
19 lines (16 loc) · 584 Bytes
/
Copy pathJSExport.ejs
File metadata and controls
19 lines (16 loc) · 584 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// swiftlint:disable vertical_whitespace trailing_newline
#if canImport(JavaScriptCore)
import JavaScriptCore
<%_ for (type of types.implementing.AutoJSExport) { -%>
<%_ if (type.kind != "protocol" && !type.annotations.skipJSExport) { -%>
@objc protocol <%= type.name %>AutoJSExport: JSExport {
<%_ for (variable of type.allVariables) { -%>
<%_ if (!variable.annotations.skipJSExport) { -%>
var <%= variable.name %>: <%= variable.typeName.name %> { get }
<%_ } -%>
<%_ } -%>
}
extension <%= type.name %>: <%= type.name %>AutoJSExport {}
<%_ } %>
<%_ } %>
#endif