MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / wrap

Method wrap

packages/core/data/observable/index.ts:80–85  ·  view source on GitHub ↗

* Returns an instance of WrappedValue. The actual instance is get from a WrappedValues pool. * @param value - Value that should be wrapped.

(value: any)

Source from the content-addressed store, hash-verified

78 * @param value - Value that should be wrapped.
79 */
80 public static wrap(value: any): any {
81 const w = _wrappedValues[_wrappedIndex++ % 5];
82 w.wrapped = value;
83
84 return w;
85 }
86}
87
88const _wrappedValues = [new WrappedValue(null), new WrappedValue(null), new WrappedValue(null), new WrappedValue(null), new WrappedValue(null)] as const;

Calls

no outgoing calls

Tested by

no test coverage detected