mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Make moduleMerge a global function - this saves a total of 83 requires upon application loading.
This commit is contained in:
@@ -14,9 +14,7 @@ function onCheckedPropertyChanged(data: dependencyObservable.PropertyChangeData)
|
||||
// register the setNativeValue callbacks
|
||||
(<proxy.PropertyMetadata>common.Switch.checkedProperty.metadata).onSetNativeValue = onCheckedPropertyChanged;
|
||||
|
||||
// merge the exports of the common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(common, exports);
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
export class Switch extends common.Switch {
|
||||
private _android: android.widget.Switch;
|
||||
|
||||
@@ -10,9 +10,7 @@ function onCheckedPropertyChanged(data: dependencyObservable.PropertyChangeData)
|
||||
// register the setNativeValue callbacks
|
||||
(<proxy.PropertyMetadata>common.Switch.checkedProperty.metadata).onSetNativeValue = onCheckedPropertyChanged;
|
||||
|
||||
// merge the exports of the common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(common, exports);
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
class SwitchChangeHandlerImpl extends NSObject {
|
||||
static new(): SwitchChangeHandlerImpl {
|
||||
|
||||
Reference in New Issue
Block a user