Skip to content

Conversation

@nailiable
Copy link

If I use a factory function to bounded a model, it does not have typescript error.

Example:
image

image

This is not correct typing, so add extends new () => unknownto restrict.

@codesandbox
Copy link

codesandbox bot commented May 13, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@nailiable
Copy link
Author

nailiable commented May 13, 2024

It have a new question for this question, if I don't use factory function, how can I use generic in model class?

@IanDxSSXX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants