MCPcopy
hub / github.com/motion-canvas/motion-canvas / initial

Function initial

packages/2d/src/lib/decorators/signal.ts:160–169  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

158 * @param value - The initial value of the property.
159 */
160export function initial<T>(value: T): PropertyDecorator {
161 return (target: any, key) => {
162 const meta = getPropertyMeta<T>(target, key);
163 if (!meta) {
164 useLogger().error(`Missing property decorator for "${key.toString()}"`);
165 return;
166 }
167 meta.default = value;
168 };
169}
170
171/**
172 * Create a signal interpolation function decorator.

Callers 15

LatexClass · 0.90
CodeBlockClass · 0.90
SplineClass · 0.90
RectClass · 0.90
View2DClass · 0.90
LayoutClass · 0.90
CodeClass · 0.90
CircleClass · 0.90
LineClass · 0.90
TxtClass · 0.90
Curve.tsFile · 0.90
TxtLeafClass · 0.90

Calls 4

useLoggerFunction · 0.90
getPropertyMetaFunction · 0.85
errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected