Skip to content

Commit 3ffb68e

Browse files
lib: doc comment follows the convertToLazyRef rename
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a3a0819 commit 3ffb68e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/Reactive.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,14 @@ function convertToLazyBoundMethod(
9898
}
9999

100100
/**
101-
* Convert a getter to a lazy-computed property.
101+
* Convert a getter to a lazily-cached Ref cell.
102102
*
103103
* Only ever called when the descriptor has a getter, so `originalGetter` is
104-
* always defined here. A getter that returns a Ref/computed is cached (stable
105-
* reactive identity); a getter that returns a plain value de-optimizes back to
106-
* a native getter on the prototype, removing all overhead for future instances.
104+
* always defined here. A getter that returns any Ref — ref(), shallowRef(),
105+
* computed() (a ComputedRef IS a Ref) — is cached under the instance symbol
106+
* (stable reactive identity); a getter that returns a plain value
107+
* de-optimizes back to a native getter on the prototype, removing all
108+
* overhead for future instances.
107109
*/
108110
function convertToLazyRef(
109111
proto: any,

0 commit comments

Comments
 (0)