Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): prettify createFeature result #4014

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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] } & {};