File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
overmind-devtools/src/client/app Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11import { derived } from 'overmind'
2- import { State } from './state'
2+ import { State , Component } from './state'
33
44export const currentApp = derived (
55 ( state : State ) => state . apps [ state . currentPort ]
66)
77
88export const componentsMounted = derived ( ( state : State ) =>
9- Object . keys ( state . currentApp . components ) . reduce ( ( aggr , key ) => {
10- if ( state . currentApp . components [ key ] . isMounted ) {
11- return aggr . concat ( state . currentApp . components [ key ] )
12- }
9+ Object . keys ( state . currentApp . components ) . reduce (
10+ ( aggr , key ) => {
11+ if ( state . currentApp . components [ key ] . isMounted ) {
12+ return aggr . concat ( state . currentApp . components [ key ] )
13+ }
1314
14- return aggr
15- } , [ ] )
15+ return aggr
16+ } ,
17+ [ ] as Component [ ]
18+ )
1619)
1720
1821export const componentsUpdateCount = derived ( ( state : State ) =>
Original file line number Diff line number Diff line change 77 "repository" : " git+https://github.com/cerebral/overmind.git" ,
88 "main" : " lib/index.js" ,
99 "module" : " es/index.js" ,
10- "types" : " lib/bundle .d.ts" ,
10+ "types" : " lib/index .d.ts" ,
1111 "scripts" : {
1212 "build" : " npm run build:lib & npm run build:es" ,
1313 "build:lib" : " tsc --outDir lib --module commonjs" ,
You can’t perform that action at this time.
0 commit comments