Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No TypeScript declarations for react-player/lazy #918

Closed
cduff opened this issue Jun 7, 2020 · 3 comments
Closed

No TypeScript declarations for react-player/lazy #918

cduff opened this issue Jun 7, 2020 · 3 comments

Comments

@cduff
Copy link

cduff commented Jun 7, 2020

Current Behavior

Trying to move to lazy loading as per instructions, importing "react-player/lazy". However this causes error as no TypeScript declaration file can be found.

Expected Behavior

Working TypeScript declaration file as per import of just "react-player".

Steps to Reproduce

Just try importing "react-player/lazy" in TypeScript project.

Environment

  • CRA
  • vscode

Other Information

n/a

@jurajkrivda
Copy link

Workaround: declare module 'react-player/lazy';

@cookpete
Copy link
Owner

cookpete commented Jun 8, 2020

It's been a while since I've used Typescript. Would it work if I just copied the index.d.ts file into the lazy directory before publishing?

@cduff
Copy link
Author

cduff commented Jun 9, 2020

It's been a while since I've used Typescript. Would it work if I just copied the index.d.ts file into the lazy directory before publishing?

I just tried that locally and it works fine. I'm not sure if there's some other more correct way.

Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
philip-luther added a commit to philip-luther/react-player that referenced this issue Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants