Download wp-calypso/packages/data-stores/src/domain-suggestions/actions.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/domain-suggestions/actions.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/data-stores/src/domain-suggestions/actions.ts
-
curl -L -o actions.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/domain-suggestions/actions.ts
1.22 kB
| import type { | |
| DomainSuggestion, | |
| DomainSuggestionQuery, | |
| DomainCategory, | |
| DomainAvailability, | |
| } from './types'; | |
| export const receiveCategories = ( categories: DomainCategory[] ) => | |
| ( { | |
| type: 'RECEIVE_CATEGORIES', | |
| categories, | |
| } ) as const; | |
| export const fetchDomainSuggestions = () => | |
| ( { | |
| type: 'FETCH_DOMAIN_SUGGESTIONS', | |
| timeStamp: Date.now(), | |
| } ) as const; | |
| export const receiveDomainAvailability = ( domainName: string, availability: DomainAvailability ) => | |
| ( { | |
| type: 'RECEIVE_DOMAIN_AVAILABILITY', | |
| domainName, | |
| availability, | |
| } ) as const; | |
| export const receiveDomainSuggestionsSuccess = ( | |
| queryObject: DomainSuggestionQuery, | |
| suggestions: DomainSuggestion[] | undefined | |
| ) => | |
| ( { | |
| type: 'RECEIVE_DOMAIN_SUGGESTIONS_SUCCESS', | |
| queryObject, | |
| suggestions, | |
| timeStamp: Date.now(), | |
| } ) as const; | |
| export const receiveDomainSuggestionsError = ( errorMessage: string ) => | |
| ( { | |
| type: 'RECEIVE_DOMAIN_SUGGESTIONS_ERROR', | |
| errorMessage, | |
| timeStamp: Date.now(), | |
| } ) as const; | |
| export type Action = ReturnType< | |
| | typeof receiveCategories | |
| | typeof fetchDomainSuggestions | |
| | typeof receiveDomainSuggestionsSuccess | |
| | typeof receiveDomainSuggestionsError | |
| | typeof receiveDomainAvailability | |
| >; | |