Skip to content

Commit 23168cf

Browse files
committed
fix: Output added to convenience callAsFunction methods in DataSource types
1 parent 8450859 commit 23168cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/FunctionalClosures/DataSource.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class DataSource<Input, Output> {
3030
projectedValue(input)
3131
}
3232

33-
public func callAsFunction() where Input == Void {
33+
public func callAsFunction() -> Output where Input == Void {
3434
projectedValue(())
3535
}
3636
}
@@ -72,7 +72,7 @@ public class OptionalDataSource<Input, Output> {
7272
projectedValue?(input)
7373
}
7474

75-
public func callAsFunction() where Input == Void {
75+
public func callAsFunction() -> Output? where Input == Void {
7676
projectedValue?(())
7777
}
7878
}

0 commit comments

Comments
 (0)