subscribeSpyTo<T> returns SubscriberSpy<unknown> instead of SubscriberSpy<T>
See original GitHub issueDescribe the bug
subscribeSpyTo<T>
returns SubscriberSpy<unknown>
instead of SubscriberSpy<T>
To Reproduce
- Create a new angular project
- Install @hirez_io/observer-spy
- Use subscribeSpyTo to test a string observable, for example -
of('str')
- See that it returns
SubscriberSpy<unknown>
instead ofSubscriberSpy<string>
Expected behavior
It should return SubscriberSpy<string>
instead of SubscriberSpy<unknown>
Screenshots Bug - Source code for subscribeSpyTo -
Desktop (please complete the following information): Angular CLI: 13.1.2 Node: 14.18.2 Package Manager: npm 6.14.15 OS: linux x64
Angular: 13.1.1 … animations, common, compiler, compiler-cli, core, forms … platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1301.2 @angular-devkit/build-angular 13.1.2 @angular-devkit/core 13.1.2 @angular-devkit/schematics 13.1.2 @angular/cli 13.1.2 @schematics/angular 13.1.2 rxjs 7.4.0 typescript 4.5.4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks a ton, Shai! It works now.
OK I managed to fix it (somehow) in version 2.1.2
For some reason, only the
.d.ts
files generated by the CI build gotunknown
as generics (while locally it was building with the correct<T>
generic)So I re-ran the build and it built it correctly this time
No clue to why it got messed up, but my guess is a TypeScript version voodoo 🤷♀️😅
Anyway, please test it and see if it works (closing for now)