-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[3.5.0-dev.20190516] Incorrect type error for mixin #31426
Labels
Milestone
Comments
RyanCavanaugh
added
the
Needs Investigation
This issue needs a team member to investigate its status.
label
Jun 13, 2019
Interesting, so |
orta
added
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
and removed
Needs Investigation
This issue needs a team member to investigate its status.
labels
Aug 8, 2019
Glad to see the progress on this issue! |
Putting this issue into backlog instead of milestoned, figuring out this issue was first evaluated in #32770 and then a more permentent fix was explored in #33050 (comment) but was considered too expensive on perf for the feature. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the mixin pattern, there are 2 main notations to define the type of the mixin entity.
The mixin pattern:
1st notation:
2nd notation:
The 1st notation can not be used for recursive definitions (#29872). Because of that we primarily use 2nd notation. It works fine in most cases, however I found a case, when it produces invalid type error. The full snippet to reproduce the problem below.
Note:
zxc
property onthis
, inside theobserve
method ofQuark
mixin.this.value
usagevalue
is used on function argumentQuark
mixin to the 1st notation, the error will disappearExpected behavior:
test
function belowThe text was updated successfully, but these errors were encountered: