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

fix: add support for TypeScript 4.8 #3548

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

markostanimirovic
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #3547

What is the new behavior?

NgRx packages work with TypeScript 4.8

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@netlify
Copy link

netlify bot commented Aug 28, 2022

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 424a4d8
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/630bbecab2f8f10008a46cbf

@@ -2,7 +2,9 @@ import { EffectMetadata, EffectsMetadata } from './models';
import { getCreateEffectMetadata } from './effect_creator';
import { getEffectDecoratorMetadata } from './effect_decorator';

export function getEffectsMetadata<T>(instance: T): EffectsMetadata<T> {
export function getEffectsMetadata<T extends Object>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may introduce a breaking change if the getEffectsMetadata function (that is part of the public API) is used with an argument of the wrong type

@@ -34,6 +34,6 @@ export interface EffectMetadata<T extends Object>
propertyName: EffectPropertyKey<T>;
}

export type EffectsMetadata<T> = {
[key in EffectPropertyKey<T>]?: EffectConfig;
export type EffectsMetadata<T extends Object> = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ same here

@@ -13,7 +13,7 @@ export function createRouterSelector<
return createFeatureSelector(DEFAULT_ROUTER_FEATURENAME);
}

export function getSelectors<V>(
export function getSelectors<V extends Record<string, any>>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[@ngrx/effects] Throws errors with typescript@4.8.2
3 participants