-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description / Steps to reproduce / Feature proposal
I've been trying to implement ts-mocha instead of the built in lb-mocha for faster test running and while I have taken care of the main issues within my code, one problem remains related to when inject checks if a getter or setter is a function.
The issue stems from the following lines: https://github.com/strongloop/loopback-next/blob/master/packages/context/src/inject.ts#L551 and https://github.com/strongloop/loopback-next/blob/master/packages/context/src/inject.ts#L426
When modifying the code and trying to make working adjustments, typeof targetType === 'function' returns true, but the check against the interface Function does not.
Current Behavior
The type of AuthenticateActionProvider.constructor[1] (Object) is not Setter function
Expected Behavior
It understand the given object is a function.