diff --git a/packages/entity/index.hooks.js b/packages/entity/index.hooks.js index 924464b..9d7d061 100644 --- a/packages/entity/index.hooks.js +++ b/packages/entity/index.hooks.js @@ -1,3 +1,5 @@ +import {mapObject} from '@avocado/core' + export function behaviorTypes() { return { entity: (entity) => { @@ -20,7 +22,11 @@ export function behaviorTypes() { }; return Traits .reduce((r, T) => ({ - ...r, children: {...r.children, ...T.behaviorTypes(), ...T.describeState()}, + ...r, children: { + ...r.children, + ...T.behaviorTypes(), + ...mapObject(T.describeState(), (spec) => ({...spec, type: `property|${spec.type}`})), + }, }), core); }, };