fancyapps / ui

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

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

Open Razunter opened 4 months ago

Razunter commented 4 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 4 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 2 months ago

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