Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Benchmarks/Sources/Generated/BridgeJS.Macros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// To update this file, just rebuild your project or run
// `swift package bridge-js`.

@_spi(Experimental) import JavaScriptKit
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit

@JSFunction func benchmarkHelperNoop() throws (JSException) -> Void

Expand Down
514 changes: 138 additions & 376 deletions Benchmarks/Sources/Generated/BridgeJS.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// To update this file, just rebuild your project or run
// `swift package bridge-js`.

@_spi(Experimental) import JavaScriptKit
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit

@JSFunction func createTS2Swift() throws (JSException) -> TS2Swift

Expand Down
244 changes: 90 additions & 154 deletions Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function main(args) {
"// To update this file, just rebuild your project or run",
"// `swift package bridge-js`.",
"",
"@_spi(Experimental) import JavaScriptKit",
"@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit",
"",
"",
].join("\n");
Expand Down
4 changes: 2 additions & 2 deletions Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export class TypeProcessor {
this.swiftLines.push(` case ${this.renderIdentifier(name)} = "${raw.replaceAll("\"", "\\\\\"")}"`);
}
this.swiftLines.push("}");
this.swiftLines.push(`extension ${swiftEnumName}: _BridgedSwiftEnumNoPayload {}`);
this.swiftLines.push(`extension ${swiftEnumName}: _BridgedSwiftEnumNoPayload, _BridgedSwiftRawValueEnum {}`);
this.swiftLines.push("");
return;
}
Expand All @@ -410,7 +410,7 @@ export class TypeProcessor {
this.swiftLines.push(` case ${this.renderIdentifier(name)} = ${raw}`);
}
this.swiftLines.push("}");
this.swiftLines.push(`extension ${swiftEnumName}: _BridgedSwiftEnumNoPayload {}`);
this.swiftLines.push(`extension ${swiftEnumName}: _BridgedSwiftEnumNoPayload, _BridgedSwiftRawValueEnum {}`);
this.swiftLines.push("");
return;
}
Expand Down
Loading