Skip to content

Commit

Permalink
Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Dec 19, 2024
1 parent 415dff7 commit 3fd4100
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { REQUEST_TYPE_DEFAULT } from '../actions/constants';
import { SocialStoreState } from '../types';

/**
* Returns the connections list from the store.
Expand All @@ -7,7 +8,7 @@ import { REQUEST_TYPE_DEFAULT } from '../actions/constants';
*
* @return {Array<import("../types").Connection>} The connections list
*/
export function getConnections( state ) {
export function getConnections( state: SocialStoreState ) {
return state.connectionData?.connections ?? [];
}

Expand Down Expand Up @@ -41,7 +42,7 @@ export function getBrokenConnections( state ) {
* @param {import("../types").SocialStoreState} state - State object.
* @param {string} serviceName - The service name.
*
* @return {Array<import("../types").Connections>} The connections.
* @return {Array<import("../types").Connection>} The connections.
*/
export function getConnectionsByService( state, serviceName ) {
return getConnections( state ).filter( ( { service_name } ) => service_name === serviceName );
Expand Down

0 comments on commit 3fd4100

Please sign in to comment.