1
代碼在野外:奇怪的JavaScript函數調用構造(0,<function>)()
return function decorateSource(DecoratedComponent) {
return (0, _decorateHandler2.default)({
connectBackend: function connectBackend(backend, sourceId) {
return backend.connectDragSource(sourceId);
},
containerDisplayName: 'DragSource',
createHandler: createSource,
registerHandler: _registerSource2.default,
createMonitor: _createSourceMonitor2.default,
createConnector: _createSourceConnector2.default,
DecoratedComponent: DecoratedComponent,
getType: getType,
collect: collect,
options: options
});
};
,問題中的結構:
(0, _decorateHandler2.default)(...)
這是怎麼回事與此包裝聲明?
也許相關http://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript/9107367#9107367 – elclanrs