Entry add exports defination

This commit is contained in:
pengfei.zhou
2020-09-04 17:05:51 +08:00
committed by osborn
parent f14017281e
commit a211ac8acb
10 changed files with 126 additions and 65 deletions

View File

@@ -1418,7 +1418,7 @@ function jsCallEntityMethod(contextId, methodName, args) {
}
function jsObtainEntry(contextId) {
const context = jsObtainContext(contextId);
return (constructor) => {
const exportFunc = (constructor) => {
const ret = class extends constructor {
constructor() {
super(...arguments);
@@ -1430,6 +1430,14 @@ function jsObtainEntry(contextId) {
}
return ret;
};
return (args) => {
if (args instanceof Array) {
return exportFunc;
}
else {
return exportFunc(args);
}
};
}
const global$1 = Function('return this')();
let __timerId__ = 0;