index.jsView |
---|
26 | 26 … | const newInterface = new Import(opts) |
27 | 27 … | const props = Object.getOwnPropertyNames(Import.prototype) |
28 | 28 … | |
29 | 29 … | |
30 | | - importMap[name] = {} |
31 | 30 … | for (const prop of props) { |
32 | | - importMap[name][prop] = newInterface[prop].bind(newInterface) |
| 31 … | + newInterface[prop] = newInterface[prop].bind(newInterface) |
33 | 32 … | } |
| 33 … | + importMap[name] = newInterface |
34 | 34 … | } |
35 | 35 … | return importMap |
36 | 36 … | } |
37 | 37 … | |
|
41 | 41 … | vm: { |
42 | 42 … | |
43 | 43 … | * adds an aync operation to the operations queue |
44 | 44 … | */ |
45 | | - pushOpsQueue: (promise, callbackIndex) => { |
| 45 … | + pushOpsQueue: (promise, callbackIndex, intefaceCallback) => { |
46 | 46 … | this._opsQueue = Promise.all([this._opsQueue, promise]).then(values => { |
47 | | - const result = values.pop() |
| 47 … | + const result = intefaceCallback(values.pop()) |
48 | 48 … | instance.exports.callback.get(callbackIndex)(result) |
49 | 49 … | }) |
50 | 50 … | }, |
51 | 51 … | memory: () => { |