We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.2.6
https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
This repro tries to use a generically typed $ref<string | number>: https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
$ref<string | number>
It doesn't work and if you look at the JS code, $ref was passed through without modification.
$ref
Strangely, if I add a second simple $ref, such as in this example: https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IHggPSAkcmVmKDEpO1xubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
Now they're both correctly transformed??
First repro should work as well
$ref<string> isn't transformed when there's no other $ref.
$ref<string>
The text was updated successfully, but these errors were encountered:
fix(ref-transform): should transform $ref when used with generic argu…
33cf6c8
…ments (#4446) fix #4442
Successfully merging a pull request may close this issue.
Version
3.2.6
Reproduction link
https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
Steps to reproduce
This repro tries to use a generically typed
$ref<string | number>
:https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
It doesn't work and if you look at the JS code,
$ref
was passed through without modification.Strangely, if I add a second simple
$ref
, such as in this example:https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcblxubGV0IHggPSAkcmVmKDEpO1xubGV0IG1zZyA9ICRyZWY8c3RyaW5nIHwgbnVtYmVyPignSGVsbG8gV29ybGQhJyk7XG5tc2cgPSA0Mjtcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxoMT57eyBtc2cgfX08L2gxPlxuICA8aW5wdXQgdi1tb2RlbD1cIm1zZ1wiPlxuPC90ZW1wbGF0ZT4ifQ==
Now they're both correctly transformed??
What is expected?
First repro should work as well
What is actually happening?
$ref<string>
isn't transformed when there's no other$ref
.The text was updated successfully, but these errors were encountered: