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
Generic for abstract class #33491
Comments
This is the intended behavior. |
why is this "as intended"? when using an abstract class as an base / "extends" it should work, shouldnt it? |
If it was allowed for abstract classes to be assignable to non-abstract construct signatures, then you could instantiate an abstract class through a trivial indirection. |
is there then a workaround? |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I know this has been discussed, but i couldnt find a solution in these issues, so my use case is as following:
throws an typescript errors because
An abstract constructor type can not be assigned to a non-abstract constructor type ts(2344)
, butInstanceType<T> & mongoose.Document
cannot be replaced by something likeFunction
, so i wanted to ask if there is currently a solution to thisusing:
PS: sorry if this is an question that should be on SO
The text was updated successfully, but these errors were encountered: