From 73b0744ce0788666485b9dff894d980e3e85cb08 Mon Sep 17 00:00:00 2001 From: laysdra7265 Date: Fri, 21 Apr 2017 23:16:54 +0800 Subject: [PATCH 1/2] fix TypeScript definitions service method "return Promise type" version not generated --- cli/targets/static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/targets/static.js b/cli/targets/static.js index cc51c32ba..f53c6ed9f 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -613,7 +613,7 @@ function buildService(ref, service) { push(""); pushComment([ method.comment || "Calls " + method.name + ".", - "@function " + escapeName(service.name) + "#" + lcName, + "@function " + escapeName(service.toString().split(' ')[1].substr(1)) + "#" + lcName, "@param {" + exportName(method.resolvedRequestType, !config.forceMessage) + "} request " + method.resolvedRequestType.name + " message or plain object", "@returns {Promise<" + exportName(method.resolvedResponseType) + ">} Promise", "@variation 2" From 2177272df1d0968e95739a0f440e9b9736bede60 Mon Sep 17 00:00:00 2001 From: laysdra7265 Date: Fri, 21 Apr 2017 23:16:54 +0800 Subject: [PATCH 2/2] fix TypeScript definitions service method "return Promise type" version not generated --- cli/targets/static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/targets/static.js b/cli/targets/static.js index cc51c32ba..017a7585c 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -613,7 +613,7 @@ function buildService(ref, service) { push(""); pushComment([ method.comment || "Calls " + method.name + ".", - "@function " + escapeName(service.name) + "#" + lcName, + "@function " + escapeName(service.toString().split(" ")[1].substr(1)) + "#" + lcName, "@param {" + exportName(method.resolvedRequestType, !config.forceMessage) + "} request " + method.resolvedRequestType.name + " message or plain object", "@returns {Promise<" + exportName(method.resolvedResponseType) + ">} Promise", "@variation 2"