Starting from version 1.0.0, react-scroll-sync provides its own TypeScript type definitions built-in.
You must uninstall the community @types/react-scroll-sync package to avoid type conflicts and ensure you are using the latest, official types.
-
Uninstall the community types:
npm uninstall @types/react-scroll-sync # or, if you use yarn: yarn remove @types/react-scroll-sync -
Update your imports (if needed):
You can now use
react-scroll-syncdirectly in your TypeScript code without any additional type packages.import { ScrollSync, ScrollSyncPane } from "react-scroll-sync";
-
Check your code:
The official types are included automatically. If you encounter any type errors, ensure the old
@types/react-scroll-syncpackage is fully removed from yournode_modulesandpackage.json.