Skip to content

Commit

Permalink
feat(store): prettify createFeature result (#4014)
Browse files Browse the repository at this point in the history
  • Loading branch information
markostanimirovic authored Aug 21, 2023
1 parent 54a01c3 commit f179316
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/store/src/feature_creator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { capitalize } from './helpers';
import { ActionReducer, Primitive, Selector } from './models';
import { ActionReducer, Prettify, Primitive, Selector } from './models';
import { isPlainObject } from './meta-reducers/utils';
import {
createFeatureSelector,
Expand Down Expand Up @@ -93,7 +93,9 @@ export function createFeature<
ExtraSelectors
>;
} & NotAllowedFeatureStateCheck<FeatureState>
): FeatureWithExtraSelectors<FeatureName, FeatureState, ExtraSelectors>;
): Prettify<
FeatureWithExtraSelectors<FeatureName, FeatureState, ExtraSelectors>
>;
/**
* Creates a feature object.
*
Expand All @@ -105,7 +107,7 @@ export function createFeature<
export function createFeature<FeatureName extends string, FeatureState>(
featureConfig: FeatureConfig<FeatureName, FeatureState> &
NotAllowedFeatureStateCheck<FeatureState>
): Feature<FeatureName, FeatureState>;
): Prettify<Feature<FeatureName, FeatureState>>;
/**
* @description
* A function that accepts a feature name and a feature reducer, and creates
Expand Down
2 changes: 2 additions & 0 deletions modules/store/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,5 @@ export interface SelectSignalOptions<T> {
*/
equal?: ValueEqualityFn<T>;
}

export type Prettify<T> = { [K in keyof T]: T[K] } & {};

0 comments on commit f179316

Please sign in to comment.