MCPcopy Create free account
hub / github.com/microsoft/SandDance / validateTailOptions

Function validateTailOptions

docs/external/js/react-dom.development.js:18126–18140  ·  view source on GitHub ↗
(tailMode, revealOrder)

Source from the content-addressed store, hash-verified

18124 }
18125
18126 function validateTailOptions(tailMode, revealOrder) {
18127 {
18128 if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
18129 if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
18130 didWarnAboutTailOptions[tailMode] = true;
18131
18132 error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
18133 } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
18134 didWarnAboutTailOptions[tailMode] = true;
18135
18136 error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
18137 }
18138 }
18139 }
18140 }
18141
18142 function validateSuspenseListNestedChild(childSlot, index) {
18143 {

Callers 1

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected