testcafe-vue-selectors icon indicating copy to clipboard operation
testcafe-vue-selectors copied to clipboard

[FR] Typings

Open John0x opened this issue 6 years ago • 2 comments

Having typings would be great :) The getVue method cannot be found and there are some problems with Selector vs SelectorPromise types.

John0x avatar Jan 08 '18 11:01 John0x

+1, I write my tests in TS and it would be really neat if tc.getVue() would not complain all the time

jakubhomoly avatar Jan 23 '18 11:01 jakubhomoly

This might help get you started,

declare module 'testcafe-vue-selectors' {
  import { Selector } from 'testcafe'
  export interface VueSelector extends Selector {
    getVue: () => {
      props: any
      state: any
      computed: any
      ref: any
    }
  }
  export default function VueSelector (name: string): VueSelector
}

cLupus avatar Apr 29 '19 10:04 cLupus