Index signature for type 'string' is missing in type... #1433
Unanswered
dallenbaldwin
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I guess |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I recently discovered Typescript mixins and saw a lot of potential with my entity schema because it enables me to compose my classes. I got really excited because it seems to work just fine with
typeorm
andtype-graphql
. Composition is much more preferable to simple inheritance because of annoying decisions made at the database level I have no control over.However... it seems these mixins break the Resolver Interface utility interface. I'm getting the error
Index signature for type 'string' is missing in type <object type>
when trying to use the resolver interface with any of these composed classes.I don't know enough about Typescript to fix it or come up with a similar workaround and was wondering if anyone else has run into it and have a solution.
Here's some code for anyone who want's to reproduce it. I'm using the Active Record pattern with
typeorm
Now here's the usage. It's also entirely possible I'm not using class mixins correctly... in which case... please correct me
Beta Was this translation helpful? Give feedback.
All reactions