Subscribe on changes!

Extend the list of script setup compiler known refs

avatar
Jul 9th 2021

What problem does this feature solve?

To optimise the generated code, script setup compiler tries to identify things that need may need unwrapping (setup-maybe-ref) and things that are definitely a ref (setup-ref).

It looks like only ref is recognized as a definite Ref. It would be a cheap enhancement to extend this list to shallowRef, computed and customRef.

What does the proposed API look like?

No new api