Download wp-calypso/client/landing/stepper/utils/enhance-flow-with-utils.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/stepper/utils/enhance-flow-with-utils.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/landing/stepper/utils/enhance-flow-with-utils.ts
-
curl -L -o enhance-flow-with-utils.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/stepper/utils/enhance-flow-with-utils.ts
415 Bytes
| import type { FlowV2 } from '../declarative-flow/internals/types'; | |
| /** | |
| * Add utility functions to the flow object. This frees the API consumers from making these functions themselves. | |
| * @param flow the flow. | |
| * @returns the enhanced flow. | |
| */ | |
| export function enhanceFlowWithUtilityFunctions< T extends FlowV2< any > >( flow: T ): T { | |
| flow.getSteps = () => { | |
| return flow.__flowSteps ?? []; | |
| }; | |
| return flow; | |
| } | |