Typescript Issue #34
-
Hello, I am getting this error when trying to use the package "yet-another-react-lightbox': $ bash -c tsc
node_modules/yet-another-react-lightbox/dist/types.d.ts(56,11): error TS1110: Type expected.
node_modules/yet-another-react-lightbox/dist/types.d.ts(56,30): error TS1005: ';' expected.
node_modules/yet-another-react-lightbox/dist/types.d.ts(56,31): error TS1128: Declaration or statement expected.
node_modules/yet-another-react-lightbox/dist/types.d.ts(57,1): error TS1128: Declaration or statement expected. Since I am importing this package, I can't ignore it within tsconfig file. skipLibCheck not useful. Have others ran into this, I have no idea how to fix this. Your thoughts? This is how I am importing the package in various files. Maybe that is why? In React Component file: // Components import YARLightbox, { Plugin } from "yet-another-react-lightbox";
import Fullscreen from "yet-another-react-lightbox/dist/plugins/fullscreen";
import Captions from "yet-another-react-lightbox/dist/plugins/captions";
import Thumbnails from "yet-another-react-lightbox/dist/plugins/thumbnails"; In my scss file: :global {
@import "~yet-another-react-lightbox/dist/styles";
@import "~yet-another-react-lightbox/dist/plugins/captions/captions";
@import "~yet-another-react-lightbox/dist/plugins/thumbnails/thumbnails";
.yarl__slide_title_container > .yarl__slide_title {
@extend %h6;
color: white;
}
.yarl__slide_description {
@extend %h6;
color: white;
}
} Any ideas on how to suppress or fix those typescript issues. They seem to revolve around this line, in the types.d.ts file from the package: interface SlotCSSProperties extends React.CSSProperties {
[key: `--yarl__${string}`]: string | number; // <---- here mostly
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
May I ask you what version of Typescript you are using? A more detailed description of your environment would help. |
Beta Was this translation helpful? Give feedback.
May I ask you what version of Typescript you are using? A more detailed description of your environment would help.