@metamask-previews/composable-controller
Advanced tools
Comparing version 5.0.1-preview.56c80981 to 5.0.1-preview.769ba8c
@@ -34,12 +34,4 @@ import { BaseController, BaseControllerV1 } from '@metamask/base-controller'; | ||
}); | ||
/** | ||
* Flat state representation, one that isn't keyed | ||
* of controller name. Instead, all child controller state is merged | ||
* together into a single, flat object. | ||
* | ||
* @returns Merged state representation of all child controllers. | ||
*/ | ||
get flatState(): {}; | ||
} | ||
export default ComposableController; | ||
//# sourceMappingURL=ComposableController.d.ts.map |
@@ -54,16 +54,2 @@ "use strict"; | ||
} | ||
/** | ||
* Flat state representation, one that isn't keyed | ||
* of controller name. Instead, all child controller state is merged | ||
* together into a single, flat object. | ||
* | ||
* @returns Merged state representation of all child controllers. | ||
*/ | ||
get flatState() { | ||
let flatState = {}; | ||
for (const controller of __classPrivateFieldGet(this, _ComposableController_controllers, "f")) { | ||
flatState = Object.assign(Object.assign({}, flatState), controller.state); | ||
} | ||
return flatState; | ||
} | ||
} | ||
@@ -70,0 +56,0 @@ exports.ComposableController = ComposableController; |
{ | ||
"name": "@metamask-previews/composable-controller", | ||
"version": "5.0.1-preview.56c80981", | ||
"version": "5.0.1-preview.769ba8c", | ||
"description": "Consolidates the state from multiple controllers into one", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21409
111