-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Type compatibility/can assign #349
Comments
Hi, yes, you are technically correct. TypeScript has some weird behavior around Besides meaning any type, or union of all types, or the superset of all types, That's why you can do The In fact, the This type will be updated in the near future, but it will be a breaking change. |
Yes. The
For the inside a class/object, yes. That's the original purpose of the type and that is handled differently. I'm working on a new way to handle branching to maximize flexibility. btw, if you want to check for |
Um, thanks for pointing it out. I thought I have the doc updated. Seems like I have missed it. It is in the docs under the It is mainly for used during testing. The return value is merely a container of the type under inspection, as all the check are done with pure type anyway (the same for For runtime check, currently the |
Forgive me if I have understood wrong (the functionality) but the following code shouldn't work without compiler problems?
If the order is inverted, it works fine. Also, the following code apparently compiles:
StackBlitz print:
Thank you :)
The text was updated successfully, but these errors were encountered: