MCPcopy
hub / github.com/vuejs/core / readonly

Function readonly

packages/reactivity/src/reactive.ts:209–219  ·  view source on GitHub ↗
(
  target: T,
)

Source from the content-addressed store, hash-verified

207 */
208/*@__NO_SIDE_EFFECTS__*/
209export function readonly<T extends object>(
210 target: T,
211): DeepReadonly<UnwrapNestedRefs<T>> {
212 return createReactiveObject(
213 target,
214 true,
215 readonlyHandlers,
216 readonlyCollectionHandlers,
217 readonlyMap,
218 )
219}
220
221/**
222 * Shallow version of {@link readonly}.

Callers 13

getMethod · 0.90
ref.spec.tsFile · 0.90
reactive.spec.tsFile · 0.90
readonly.spec.tsFile · 0.90
Set.spec.tsFile · 0.90
useTemplateRefFunction · 0.90
toReadonlyFunction · 0.85
effect.spec.tsFile · 0.85
setupFunction · 0.85
renderList.spec.tsFile · 0.85
ref.test-d.tsFile · 0.85

Calls 1

createReactiveObjectFunction · 0.85

Tested by 1

setupFunction · 0.68