mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
API8eTS工程的FA模型查看预览器输出日志窗口,日志打印不完全
Signed-off-by: buzhifeng <buzhifeng2@huawei.com>
This commit is contained in:
@@ -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>();
|
||||
|
||||
+2
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user