fancyapps / ui

A library of JavaScript UI components, includes the best lightbox - Fancybox5
https://fancyapps.com/
Other
820 stars 99 forks source link

Fancybox.getInstance is incorrectly typed, missing string option #654

Open Razunter opened 6 months ago

Razunter commented 6 months ago

Describe the bug

Fancybox.d.ts contains static getInstance(id?: number): Fancybox | null;

while Options.d.ts types id as string | number

Reproduction

Types issue

Additional context

No response

Razunter commented 6 months ago

In addition, maybe Images.content option should allow for undefined return value. Currently, it's content?: (instance: Images, slide: slideType) => string | HTMLElement | HTMLPictureElement;, making it content?: (instance: Images, slide: slideType) => string | HTMLElement | HTMLPictureElement | undefined; would make sense.

Razunter commented 3 months ago

slideType doesn't have iframeAttr, but it works and in docs