hash-navigation.d.ts 775 B

1234567891011121314151617181920212223242526272829303132
  1. import Swiper from '../swiper-class';
  2. export interface HashNavigationMethods {}
  3. export interface HashNavigationEvents {
  4. /**
  5. * Event will be fired on window hash change
  6. */
  7. hashChange: (swiper: Swiper) => void;
  8. /**
  9. * Event will be fired when swiper updates the hash
  10. */
  11. hashSet: (swiper: Swiper) => void;
  12. }
  13. export interface HashNavigationOptions {
  14. /**
  15. * Set to `true` to enable also navigation through slides (when hashnav
  16. * is enabled) by browser history or by setting directly hash on document location
  17. *
  18. * @default false
  19. */
  20. watchState?: boolean;
  21. /**
  22. * Works in addition to hashnav to replace current url state with the
  23. * new one instead of adding it to history
  24. *
  25. * @default false
  26. */
  27. replaceState?: boolean;
  28. }