-
Notifications
You must be signed in to change notification settings - Fork 286
Table decorator overloaded returning incorrect void type #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tried to solve the issue by returning void or void|Function, but neither passes the tests. |
Hey @Danlock which exact strict option do you mean? |
Posted is my tsconfig.json |
Any updates on this? Examples from readme simply don't compile in strict mode. |
Sry completely overseen this issue. But @mxs42 What's your issue here? :) |
@RobinBuschmann well, it turns out that I messed with types while hot-fixing an issue with AnyWhereOptions and broke some code accidentally 😆 |
I don't use sequelize-typescript anymore (and I believe it was issue on my side) so I guess it can be closed. |
I also don't use typescript anymore, so If you can't reproduce it, that's good enough for me. |
So first of all, if a decorator returns void instead of Function on strict mode typescript throws an error because of this, and it can't really be worked around., or used as a decorator in strict mode. So the type is wrong because of that.
microsoft/TypeScript#4534
https://stackoverflow.com/questions/36446480/typescript-decorator-reports-unable-to-resolve-signature-of-class-decorator-whe
The way I found it is that IDefineOptions is incorrect, in that it doesn't allow indexes with where conditions. This type definition is hosted outside the library, so it isn't as relevant but it causes making a table with decorators with partial indexes throw errors on typescript strict mode.
The quick workaround is to just set the where key under indexes as an any key on the object so typescript cant detect it. such as
['where' as any]
The text was updated successfully, but these errors were encountered: