index.d.ts 483 B

123456789101112131415161718
  1. interface DialogPolyfillType {
  2. registerDialog(dialog: HTMLDialogElement): void;
  3. forceRegisterDialog(dialog: HTMLDialogElement): void;
  4. }
  5. /**
  6. * If used as CJS, then "dialogPolyfill" is added to the global scope. Just assert it exists.
  7. */
  8. declare global {
  9. const dialogPolyfill: DialogPolyfillType;
  10. }
  11. /**
  12. * If used as ESM, then we export a const of type "DialogPolyfillType" as the default.
  13. */
  14. declare const dialogPolyfill: DialogPolyfillType
  15. export default dialogPolyfill;