Permalink
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 548 Bytes
// swiftlint:disable vertical_whitespace trailing_newline
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 {}
<%_ } %>
<%_ } %>