提交 cd9c256b 编写于 作者: B buzhifeng

API8eTS工程的FA模型查看预览器输出日志窗口,日志打印不完全

Signed-off-by: Nbuzhifeng <buzhifeng2@huawei.com>
上级 8202f9aa
......@@ -4,7 +4,7 @@
"description": "generate mock",
"main": "main.js",
"scripts": {
"build": "npm install && tsc && cd dist && node main.js && cd .. && eslint -c .eslintrc --fix ../runtime/**/systemplugin/**/*.js"
"build": "npm install && node ../node_modules/typescript/bin/tsc && cd dist && node main.js && cd .. && eslint -c .eslintrc --fix ../runtime/**/systemplugin/**/*.js"
},
"keywords": [
"mock"
......
......@@ -37,7 +37,11 @@ export function generateCommonFunction(rootName: string, functionArray: Array<Fu
functionBody += getCallbackStatement();
}
if (functionEntity.returnType.returnKind !== SyntaxKind.VoidKeyword) {
functionBody += getReturnStatement(functionEntity.returnType, sourceFile);
if (rootName === 'featureAbility' && functionEntity.returnType.returnKindName === 'Context') {
functionBody += 'return _Context;';
} else {
functionBody += getReturnStatement(functionEntity.returnType, sourceFile);
}
}
} else {
const argSet: Set<string> = new Set<string>();
......
......@@ -36,7 +36,11 @@ export function generateCommonMethodSignature(rootName: string, methodSignatureA
methodSignatureBody += getCallbackStatement();
}
if (methodEntity.returnType.returnKind !== SyntaxKind.VoidKeyword) {
methodSignatureBody += getReturnStatement(methodEntity.returnType, sourceFile);
if (rootName === 'Context' && methodEntity.returnType.returnKindName === 'Context') {
methodSignatureBody += 'return Context;';
} else {
methodSignatureBody += getReturnStatement(methodEntity.returnType, sourceFile);
}
}
} else {
const argSet: Set<string> = new Set<string>();
......
......@@ -7,8 +7,8 @@
"scripts": {
"test:lint": "eslint -c .eslintrc --fix test/**/*.ts",
"test:unit": "mocha --timeout 5000 -r ts-node/register test/lib.ts test/ut/**/*.ts test/ut/*.ts",
"build:mock": "cd ./mock-generate && npm run build && cd ..",
"build": "node build_jsmock_system_plugin.js && node build_strip_native_min.js"
"build:mock": "cd ./mock-generate && npm run build",
"build": "npm run build:mock && node build_jsmock_system_plugin.js && node build_strip_native_min.js"
},
"keywords": [
"javascript",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册