-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Steps to reproduce
- Create an app that uses
RepositoryMixin - Try to override the application
startmethod
Current Behavior
error TS2425: Class '... & RestApplication' defines instance member property 'start', but extended class 'Application' defines it as instance member function.
Expected Behavior
It should compile!
It used to compile just fine in older releases.
Link to reproduction sandbox
- clone https://github.com/mgabeler-lee-6rs/lb4-bugs
- run
npm run build
Additional information
Playing around with the mixins:
BootMixin(RestApplication)-- OKBootMixinre-declares thestartmember
BootMixin(RepositoryMixin(RestApplication))-- failsRepositoryMixin(BootMixin(RestApplication))-- fails
Looking through the history of repository.mixin.ts, the only thing I see that I could point to as a probable cause for this is https://github.com/loopbackio/loopback-next/pull/5394/files#diff-11574932d711bedee7d0693e1b5f50ebfd143a78cc62e36bb31ea5e0e711140c
Overriding application.start is "documented as OK" if you will, insofar as the hello-world example uses it almost exactly the way my repro does, the difference being that hello-world doesn't have the repos mixin: https://github.com/loopbackio/loopback-next/blob/master/examples/hello-world/src/application.ts#L23
Related Issues
Nothing found yet