Skip to content
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

allOf types do not have all the correct instanceofs #37

Open
sakari opened this issue Feb 7, 2020 · 0 comments
Open

allOf types do not have all the correct instanceofs #37

sakari opened this issue Feb 7, 2020 · 0 comments

Comments

@sakari
Copy link
Collaborator

sakari commented Feb 7, 2020

makeAllOf uses the last type in allOf as the class to instantiate. This is a bit incorrect as then you cannot do X instanceof T for allOf: T, K. Also the types of the fields suffer from this issue.

Instead we should I guess merge the type definitions recursively and set the instanceof manually to the new object with Symbol.hasInstance

see smartlyio/oats-runtime#57 for related discussion on dangers of classes

sakari pushed a commit that referenced this issue Aug 25, 2021
sakari added a commit that referenced this issue Aug 25, 2021
sakari pushed a commit that referenced this issue Aug 25, 2021
Update dependency ts-jest to v26.3.0
sakari pushed a commit that referenced this issue Aug 31, 2021
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

No branches or pull requests

1 participant