MCPcopy
hub / github.com/pmndrs/react-spring / getAnimatedType

Function getAnimatedType

packages/animated/src/getAnimatedType.ts:9–18  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

7
8/** Return the `Animated` node constructor for a given value */
9export function getAnimatedType(value: any): AnimatedType {
10 const parentNode = getAnimated(value)
11 return parentNode
12 ? (parentNode.constructor as any)
13 : is.arr(value)
14 ? AnimatedArray
15 : isAnimatedString(value)
16 ? AnimatedString
17 : AnimatedValue
18}

Callers 3

constructorMethod · 0.90
_mergeMethod · 0.90
_setMethod · 0.90

Calls 2

getAnimatedFunction · 0.90
isAnimatedStringFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…