(callback)
| 579 | const callbackIdsCheckedForState = {}; |
| 580 | |
| 581 | function validateState(callback) { |
| 582 | const {state, output} = callback; |
| 583 | |
| 584 | // ensure we don't check the same callback for state multiple times |
| 585 | if (callbackIdsCheckedForState[output]) { |
| 586 | return; |
| 587 | } |
| 588 | callbackIdsCheckedForState[output] = 1; |
| 589 | |
| 590 | const cls = 'State'; |
| 591 | |
| 592 | state.forEach(({id, property}) => { |
| 593 | if (typeof id === 'string') { |
| 594 | const idPath = getPath(paths, id); |
| 595 | if (!idPath) { |
| 596 | if (validateIds) { |
| 597 | missingId(id, cls, [callback]); |
| 598 | } |
| 599 | } else { |
| 600 | validateProp(id, idPath, property, cls, [callback]); |
| 601 | } |
| 602 | } |
| 603 | // Only validate props for State object ids that we don't need to |
| 604 | // resolve them to specific inputs or outputs |
| 605 | else if (!intersection([MATCH, ALLSMALLER], values(id)).length) { |
| 606 | validateIdPatternProp(id, property, cls, [callback]); |
| 607 | } |
| 608 | }); |
| 609 | } |
| 610 | |
| 611 | function validateMap(map, cls, doState) { |
| 612 | for (const id in map) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…