Code Monkey home page Code Monkey logo

Comments (4)

nicholaschiang avatar nicholaschiang commented on August 18, 2024 2

@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.

nosovsh avatar nosovsh commented on August 18, 2024 2

npm i --save-dev @types/react-scroll-sync works now

from react-scroll-sync.

okonet avatar okonet commented on August 18, 2024

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.

Ethan-Arrowood avatar Ethan-Arrowood commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.