Skip to content

Commit

Permalink
Fix ambigous typescript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhelvikspond authored and Jens-G committed Jan 24, 2024
1 parent 7d4c7fa commit 9d96f20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/cpp/src/thrift/generate/t_js_generator.cc
Expand Up @@ -2851,12 +2851,12 @@ std::string t_js_generator::ts_function_signature(t_function* tfunction, bool in
}
}
if (exception_types == "") {
str += "callback?: (error: void, response: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
str += "callback: (error: void, response: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
} else {
str += "callback?: (error: " + exception_types + ", response: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
str += "callback: (error: " + exception_types + ", response: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
}
} else {
str += "callback?: (data: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
str += "callback: (data: " + ts_get_type(tfunction->get_returntype()) + ")=>void): ";
}

if (gen_jquery_) {
Expand Down

0 comments on commit 9d96f20

Please sign in to comment.