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

Add Typescript Declarations #9

Open
ammar-oker opened this issue May 5, 2022 · 2 comments · May be fixed by #22
Open

Add Typescript Declarations #9

ammar-oker opened this issue May 5, 2022 · 2 comments · May be fixed by #22

Comments

@ammar-oker
Copy link

The package has no corresponding Typescript declarations, therefore it cannot be used in a TS project.

@doubleforte
Copy link

+1.

@dealancer
Copy link

dealancer commented Jun 3, 2022

There is a workaround I used to make it work in TS.

  1. Add "allowJs": true into tsconfig.json
  2. Add following declarations into photoswipe-dynamic-caption-plugin.d.ts:
declare module 'photoswipe-dynamic-caption-plugin';
  1. Add following declarations into photoswipe.d.ts:
    declare module 'photoswipe';
    declare module 'photoswipe/lightbox';

Also don't forget to include css.

@pscanf pscanf linked a pull request Feb 23, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants