Currently, I am in the process of developing a list manager that enforces unique values and includes a variety of utility functions. However, when I attempt to wrap the array find and findIndex method, TypeScript seems to misinterpret the output.
This issue is part of an Angular 7 library that I am constructing. Despite searching online, I have not come across any solutions that address my specific problem.
In my abstract class ListManagerAbstract<T>, I have implemented a find method which accepts a findStrategy parameter. The function should work as expected, but it is encountering errors.
When examining the error message, it mentions that Type 'T & Function' is not assignable to type. It appears that TypeScript is interpreting the generic T as a Function incorrectly, leading to confusion in the code. Is this an actual problem or just a misinterpretation on my end?
The error further states that Type 'Function' does not match the required signature for the find method. This discrepancy indicates there might be a compatibility issue within the implementation. What could be causing this issue?