Comments (4)
@StefanoSega here's a very scrappy workaround:
// global.d.ts
declare module 'react-scroll-sync' {
import * as React from 'react';
export const ScrollSync: React.FC;
export const ScrollSyncPane: React.FC;
}
TSC should be able to pick it up (it automatically looks for and includes any global.d.ts
files for module definitions, etc). You can add prop types if you use them (I don't, so there aren't any in that typing).
from react-scroll-sync.
npm i --save-dev @types/react-scroll-sync
works now
from react-scroll-sync.
I don’t plan anything for this repo. If you’re interested in adding types, I’d be happy to merge such a PR but I think it will go into another repo.
from react-scroll-sync.
If you're going to add types I recommend adding it as an index.d.ts and including it in the package.json file under the types
property. Using global can mess with other types and have unintended side effects.
But also, these types may best live in DT
from react-scroll-sync.
Related Issues (20)
- Move `prop-types` to regular `dependencies` HOT 10
- [Feature request] Sync callback HOT 2
- Stop using React.Children.only HOT 3
- [Feature Request] Initial Scroll Position HOT 2
- Incorrect peer dependency for react 17+ HOT 2
- Legacy context API and deprecated findDOMNode warnings HOT 5
- Usage in Readme.md HOT 4
- Sync not working with React Table Grid component HOT 2
- Module parse failed: File was processed with these loaders: HOT 3
- Warning: Legacy context API has been detected within a strict-mode tree. HOT 4
- Glitches with scroll-behavior: smooth HOT 1
- v0.11.0 changes behavior in a breaking way for our app with no attachTo prop is provided HOT 2
- ref on ScrollSyncPane child is not working HOT 2
- why use requestAnimationFrame to achieve synchronous scrolling instead of directly updating element? HOT 1
- Get refs from scrollable elements & prevent memory leaks HOT 1
- Element is not defined HOT 7
- Vanilla JS alternative
- TypeScript Error: 'ScrollSync' cannot be used as a JSX component HOT 1
- The synchronization does not work when a pane belongs to multiple groups
- TypeError: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "BooleanLiteral"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-scroll-sync.