Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to typescript #31

Closed
oumoussa98 opened this issue Jul 26, 2022 · 3 comments
Closed

migrate to typescript #31

oumoussa98 opened this issue Jul 26, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@oumoussa98
Copy link
Owner

No description provided.

@oumoussa98 oumoussa98 added the enhancement New feature or request label Jul 26, 2022
@pylvr
Copy link

pylvr commented Jan 23, 2023

Any updates on this ?

@oumoussa98
Copy link
Owner Author

Hi @yasserss,
Nope, There is nothing yet

@fabis94
Copy link

fabis94 commented Mar 9, 2023

For anyone interested you can use this type augmentation I created:

declare module 'v3-infinite-loading' {
  declare const InfiniteLoading: import('vue').DefineComponent<
    {
      /**
       * This property is used to specify the scrollable element, it can be any valid css selector.
       * Default: window
       */
      target?: string
      /**
       * The 'infinite' event will be fired if the scroll distance is less than this value.
       * Defaults to: 0
       */
      distance?: number
      /**
       * This property is used to set the load direction to top.
       * Defaults to: false
       */
      top?: boolean
      /**
       * The component will be reset if this value changes
       */
      identifier?: any
      /**
       * This property is used to specify weither you want the component to handle first load or not.
       * Defaults to: true
       */
      firstload?: boolean
    },
    {},
    {},
    {},
    {},
    {},
    {},
    {
      infinite: ($state: {
        /**
         * Informs the component that this loading has been successful
         */
        loaded: () => void
        /**
         * Informs the component that all of the data has been loaded successfully
         */
        complete: () => void
        /**
         * Inform the component that this loading failed, the content of the `error` slot will be displayed
         */
        error: () => void
      }) => void
    }
  >
  export default InfiniteLoading
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants