B
B
bormor2019-10-01 12:09:24
typescript
bormor, 2019-10-01 12:09:24

How to correctly rewrite the "scrolled: debounce(function (position) { ..." method to typescript?

import { debounce } from 'quasar'

export default {
  methods: {
    scrolled: debounce(function (position) {  // ВОТ ЭТУ СТРОКУ
      ...
    }, 200) // debounce for 200ms
  }
}

Is this the correct approach?
(snippet for 'vue-class-component')
scrolled(){
  return debounce((position) => {
    ...
  }, 200) // debounce for 200ms
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bormor, 2019-10-01
@bormor

scrolled(){
  return debounce( (position) => {
  ...
  }, 200)
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question