accessible-astro-components icon indicating copy to clipboard operation
accessible-astro-components copied to clipboard

Modal: Property 'closeModal' does not exist

Open mrcnski opened this issue 1 year ago • 1 comments

Thanks for the useful resource! I noticed that astro check throws the following error:

src/components/Modal.astro:216:10 - error ts(2339): Property 'closeModal' does not exist on type 'Window & typeof globalThis'.

216   window.closeModal = closeModal
             ~~~~~~~~~~

I believe it should simply be window.close. See also https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close.

mrcnski avatar Feb 29 '24 14:02 mrcnski