Closed Robert-M-Muench closed 5 years ago
Some operators return the voldemort type like std.algorithm and std.range.
Where do you want to declare a type?
There are also methods like this if you want to unify the type to the interface.
'Observable!T f = filtered.observableObject!T()'
I need the types because I want to declare class/struct members.
I now used:
alias typeof(osStream.WMStream.filter!(wm => wm.message == WM_DESTROY)) wmDestroyType;
So I'm able to reference the type at several places. But it's more a trial and error process to come-up with the correct declaration.
I made the FilterObservable public in `v 0.11. 0 '. https://github.com/lempiji/rx/commit/61707e2c0e0cb0096541ad92b6785cb16898283b
However, it may be difficult to manually specify several template parameters one by one.
Given the cost of writing everything by hand, I think your method is a good solution. If you're comfortable wrapping in interfaces or classes, try using the observableObject function.
If there is anything else, please ask me again.
I can get my code to work using auto and filter! but I'm wondering what the explicit return type of filter!(...) is? The type suggested is FilterObservable, but this one can't be used in my code.
This gives: Error: undefined identifier FilterObservable