Bind Interface with Implementation to AdonisJS v5 (Repository Pattern) #3711
Unanswered
HungThinhIT
asked this question in
Help
Replies: 1 comment
-
TypeScript interfaces are not available during runtime. So therefore you cannot use them as a runtime key or value inside your code. You can learn about how TypeScript works from their official docs or maybe some online tutorial |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I'm trying to apply Repository Pattern inside AdonisJS v5, but I have a issue with bind interface with implementation
My
User
ModelMy
Repository Interface
My
Repository Implement
My
Controller
I got this error when trying getting data (Maybe for missed bind from app provider):
And inside
register
function ofAppProvider.ts
, I don't known how to binding Interface and implement(I want do same thing with Laravel ex:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions