| 428 | } |
| 429 | |
| 430 | class GetterRefImpl<T> { |
| 431 | public readonly [ReactiveFlags.IS_REF] = true |
| 432 | public readonly [ReactiveFlags.IS_READONLY] = true |
| 433 | public _value: T = undefined! |
| 434 | |
| 435 | constructor(private readonly _getter: () => T) {} |
| 436 | get value() { |
| 437 | return (this._value = this._getter()) |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | export type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>> |
| 442 |
nothing calls this directly
no outgoing calls
no test coverage detected