Skip to content

Commit 020a9ea

Browse files
Remove async from generated interfaces to avoid "'async' modifier cannot be used in an ambient context.ts(1040)" warning on typescript side
1 parent af19b61 commit 020a9ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TypeScriptPlugin/Implementation/ExportableFunction.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct ExportableFunction: @unchecked Sendable {
1414

1515
extension ExportableFunction {
1616
var typescriptInterface: String {
17-
var result = "async function \(name)("
17+
var result = "function \(name)("
1818
result.append(parameters.map { "\($0.name): \(Self.typeScriptType(for: $0.type))" }.joined(separator: ", "))
1919
result.append("): Promise<")
2020
result.append(returnType.map { Self.typeScriptType(for: $0) } ?? "void")

0 commit comments

Comments
 (0)