( pendingProps: any, mode: TypeOfMode, lanes: Lanes, key: null | string, )
| 769 | } |
| 770 | |
| 771 | function createFiberFromProfiler( |
| 772 | pendingProps: any, |
| 773 | mode: TypeOfMode, |
| 774 | lanes: Lanes, |
| 775 | key: null | string, |
| 776 | ): Fiber { |
| 777 | if (__DEV__) { |
| 778 | if (typeof pendingProps.id !== 'string') { |
| 779 | console.error( |
| 780 | 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', |
| 781 | typeof pendingProps.id, |
| 782 | ); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | const fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); |
| 787 | fiber.elementType = REACT_PROFILER_TYPE; |
| 788 | fiber.lanes = lanes; |
| 789 | |
| 790 | if (enableProfilerTimer) { |
| 791 | fiber.stateNode = { |
| 792 | effectDuration: 0, |
| 793 | passiveEffectDuration: 0, |
| 794 | }; |
| 795 | } |
| 796 | |
| 797 | return fiber; |
| 798 | } |
| 799 | |
| 800 | export function createFiberFromSuspense( |
| 801 | pendingProps: any, |
no test coverage detected