refactor: decorate property types
This commit is contained in:
parent
8c657994b4
commit
a7b34bfcd1
|
@ -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);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user