| 85 | export function reactive<T extends object>(target: T): Reactive<T> |
| 86 | /*@__NO_SIDE_EFFECTS__*/ |
| 87 | export function reactive(target: object) { |
| 88 | class="cm">// if trying to observe a readonly proxy, return the readonly version. |
| 89 | if (isReadonly(target)) { |
| 90 | return target |
| 91 | } |
| 92 | return createReactiveObject( |
| 93 | target, |
| 94 | false, |
| 95 | mutableHandlers, |
| 96 | mutableCollectionHandlers, |
| 97 | reactiveMap, |
| 98 | ) |
| 99 | } |
| 100 | |
| 101 | class="cm">// Use a private class brand instead of a marker property so shallow-reactive |
| 102 | class="cm">// types remain distinguishable in `UnwrapRef` without leaking the brand into |