Download wp-calypso/packages/data-stores/src/user/index.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/user/index.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/data-stores/src/user/index.ts
-
curl -L -o index.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/user/index.ts
653 Bytes
| import { registerStore } from '@wordpress/data'; | |
| import { controls } from '../wpcom-request-controls'; | |
| import { createActions } from './actions'; | |
| import { STORE_KEY } from './constants'; | |
| import reducer, { State } from './reducer'; | |
| import { createResolvers } from './resolvers'; | |
| import * as selectors from './selectors'; | |
| export * from './types'; | |
| export type { State }; | |
| let isRegistered = false; | |
| export function register(): typeof STORE_KEY { | |
| if ( ! isRegistered ) { | |
| isRegistered = true; | |
| registerStore( STORE_KEY, { | |
| actions: createActions(), | |
| controls, | |
| reducer, | |
| resolvers: createResolvers(), | |
| selectors, | |
| } ); | |
| } | |
| return STORE_KEY; | |
| } | |