Skip to content
This repository was archived by the owner on Dec 26, 2017. It is now read-only.

Update effects-subscription.ts#97

Merged
brandonroberts merged 1 commit intongrx:masterfrom
atscott:patch-1
Mar 14, 2017
Merged

Update effects-subscription.ts#97
brandonroberts merged 1 commit intongrx:masterfrom
atscott:patch-1

Conversation

@atscott
Copy link
Copy Markdown
Contributor

@atscott atscott commented Jan 24, 2017

Correct me if I'm wrong, but I'm pretty sure the type should be Observer<Action>. As a matter of fact, this won't build for me without the change.

Correct me if I'm wrong, but I'm pretty sure the type should be Observer<Action>. As a matter of fact, this won't build for me without the change.
@cyr-x
Copy link
Copy Markdown

cyr-x commented Feb 9, 2017

Please merge this pull request, it's fixing angular 4 beta-x type errors

@mattmutt
Copy link
Copy Markdown

mattmutt commented Mar 4, 2017

This fix will definitely help for AoT type checked builds. JIT mode still builds fine as it is less strict.

manually overriding the effects-subscription.d.ts declaration with

import { OpaqueToken, OnDestroy } from '@angular/core';
import { Observer } from 'rxjs/Observer';
import { Subscription } from 'rxjs/Subscription';
import { Action } from '@ngrx/store/src/dispatcher';
export declare const effects: OpaqueToken;
export declare class EffectsSubscription extends Subscription implements OnDestroy {
    private store;
    parent: EffectsSubscription;
    constructor(store: Observer<Action>, parent: EffectsSubscription, effectInstances?: any[]);
    addEffects(effectInstances: any[]): void;
    ngOnDestroy(): void;
}

unblocks the AoT compilation , does exactly what @atscott solved in the source.

@gregbown
Copy link
Copy Markdown

gregbown commented Mar 7, 2017

Thank you @atscott and @mattmutt wasted so much time on this grrr! Everything else seems to be working with 4.0.0-rc.2 I just couldn't get effects to compile.

@nosachamos
Copy link
Copy Markdown

nosachamos commented Mar 10, 2017

@brandonroberts hey man, this issue is a real pain, would you mind merging this PR to solve it? Thanks a lot!

@mikkeldamm
Copy link
Copy Markdown

@nosachamos I think that this issue is fixed in the version 3.0 but they are waiting for the stable verison of 4.0.0 of angular.

Until then, you can use this commit on my fork, that works with 4.0.0.rc.2

"@ngrx/effects": "https://github.com/mikkeldamm/effects/tarball/56d75b368bebc606ed326b5db5387a99855f97a3",

@nosachamos
Copy link
Copy Markdown

@mikkeldamm oh, I hadn't seen they were already working on 3.0 for ng 4. Very cool, thanks for the heads up. I ended up having my fork with this fix as well, but thanks anyways! 👍

@brandonroberts brandonroberts self-assigned this Mar 14, 2017
@brandonroberts brandonroberts merged commit 7aa2e00 into ngrx:master Mar 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants