import type { Fiber } from 'react-reconciler' ; param fiber param index returns export function updateFibersIndex ( fiber , index ) { while ( fiber ) { fiber . index = index ; ( fiber as Fiber | null ) = fiber . sibling ; index += 1 ; } return index - 1 ; } param child param parent export function updateFiberDebugFields ( child , parent ) { let fiberToCopy ; if ( parent . child === child ) { if ( child . sibling === null ) { fiberToCopy = parent ; } else { fiberToCopy = child . sibling ; } } else { fiberToCopy = parent . child || parent ; } child . _debugOwner = fiberToCopy . _debugOwner ; child . _debugSource = fiberToCopy . _debugSource ; }