Skip to content

Getting TypeScript error, when pass to withPause animations with string values (colors) #505

@Artem2001S

Description

@Artem2001S

Example:

const color1Shared = useSharedValue('#00F1A7');

useEffect(()=> { 
      // get TS error: Type 'number' is not assignable to type 'string'.ts
      color1Shared.value = withPause(
        withRepeat(withDelay(4000, withTiming('#FFD651',{duration:3000})), -1, true),
        isPausedShared,
      );
}, [color1Shared])

    "react-native-redash": "^18.1.0",
    "react-native": "0.68.2",
    "typescript": "^4.4.4"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions