Skip to content

Commit

Permalink
tsMethod.setAsync(useAsync); removed from mapReturnType method
Browse files Browse the repository at this point in the history
  • Loading branch information
twozniak committed Sep 16, 2020
1 parent ef548a7 commit 8f321d8
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,10 @@ public void changeMethodBeforeImplementationGeneration(TSMethod tsMethod) {
@Override
public TSType mapReturnType(TSMethod tsMethod, TSType tsType) {
if (isRestClass(tsMethod.getOwner())) {
tsMethod.setAsync(useAsync);
if (useAsync) {
return tsType;
} else {
if (tsType == TypeMapper.tsVoid) {
return new TSInterfaceReference(promiseInterface, responseInterface);
}
return new TSInterfaceReference(promiseInterface, tsType);
if (tsType == TypeMapper.tsVoid) {
return new TSInterfaceReference(promiseInterface, responseInterface);
}
return new TSInterfaceReference(promiseInterface, tsType);
}
return tsType;
}
Expand Down

0 comments on commit 8f321d8

Please sign in to comment.