mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
86016: Add typedocs
This commit is contained in:
@@ -5,6 +5,9 @@ export const CorrelationIDActionTypes = {
|
||||
SET: type('dspace/core/correlationId/SET')
|
||||
};
|
||||
|
||||
/**
|
||||
* Action for setting a new correlation ID
|
||||
*/
|
||||
export class SetCorrelationIdAction implements Action {
|
||||
type = CorrelationIDActionTypes.SET;
|
||||
|
||||
@@ -12,4 +15,7 @@ export class SetCorrelationIdAction implements Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Type alias for all correlation ID actions
|
||||
*/
|
||||
export type CorrelationIdAction = SetCorrelationIdAction;
|
||||
|
@@ -9,6 +9,12 @@ const initialState = null;
|
||||
|
||||
export const correlationIdSelector = (state: AppState) => state.correlationId;
|
||||
|
||||
/**
|
||||
* Reducer that handles actions to update the correlation ID
|
||||
* @param {string} state the previous correlation ID (null if unset)
|
||||
* @param {CorrelationIdAction} action the action to perform
|
||||
* @return {string} the new correlation ID
|
||||
*/
|
||||
export const correlationIdReducer = (state = initialState, action: CorrelationIdAction): string => {
|
||||
switch (action.type) {
|
||||
case CorrelationIDActionTypes.SET: {
|
||||
|
Reference in New Issue
Block a user