MCPcopy
hub / github.com/midrender/revideo / createRef

Function createRef

packages/core/src/utils/createRef.ts:9–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7}
8
9export function createRef<T>(): Reference<T> {
10 let value: T;
11 const ref = (newValue?: T) => {
12 if (newValue !== undefined) {
13 value = newValue;
14 } else {
15 return value;
16 }
17 };
18
19 return ref as Reference<T>;
20}
21
22export function makeRef<TObject, TKey extends keyof TObject>(
23 object: TObject,

Callers 15

query.test.tsxFile · 0.90
children.test.tsxFile · 0.90
getFunction · 0.90
example.tsxFile · 0.90
SwitchClass · 0.90
tweening-color.tsxFile · 0.90
components.tsxFile · 0.90
positioning.tsxFile · 0.90
quickstart.tsxFile · 0.90
code-block.tsxFile · 0.90
media-video.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected