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

@Output with ReplaySubject no longer working #689

Closed
lneumeier-visma opened this issue Jan 7, 2025 · 1 comment · Fixed by #693
Closed

@Output with ReplaySubject no longer working #689

lneumeier-visma opened this issue Jan 7, 2025 · 1 comment · Fixed by #693

Comments

@lneumeier-visma
Copy link

Is this a regression?

Yes

Description

ReplaySubjects as Output, results in compile errors.

component.ts

@Output() selectionChange = new ReplaySubject<string>(1);

component.spec.ts

const spy = jasmine.createSpy();
spectator.output('selectionChange').subscribe(spy);

probably introduced with
#671

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-abj1gksv?file=src%2Fmain.spec.ts

Please provide the exception or error you saw

Overload 1 of 3, '(output: never): never', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'never'.
  Overload 2 of 3, '(output: never): Observable<unknown>', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'never'.
  Overload 3 of 3, '(output: never): OutputEmitterRef<unknown>', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'never'.

Please provide the environment you discovered this bug in

Angular 18.2
Spectator 19.3

Anything else?

No response

Do you want to create a pull request?

No

Copy link

stackblitz bot commented Jan 7, 2025

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

lneumeier added a commit to lneumeier/spectator that referenced this issue Feb 6, 2025
Allow subjects as component output

✅ Closes: ngneat#689
lneumeier added a commit to lneumeier/spectator that referenced this issue Feb 6, 2025
Allow subjects as component output

✅ Closes: ngneat#689
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 a pull request may close this issue.

1 participant