Skip to content

Commit

Permalink
Add: type declaration file, update dependencies (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavsingh97 committed Apr 21, 2023
1 parent 10337b9 commit d0ae9f8
Show file tree
Hide file tree
Showing 3 changed files with 1,978 additions and 2,218 deletions.
24 changes: 24 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NightwatchAPI, Element } from 'nightwatch';
import { MountingOptions } from '@vue/test-utils';

type GlobalMountOptions = NonNullable<MountingOptions<any>['global']>;

declare module 'nightwatch' {
interface NightwatchAPI {
importScript(
scriptPath: string,
options: { scriptType: string; componentType: string },
callback?: () => void
): this;
mountComponent(
componentPath: string,
options?: {
props?: Pick<MountingOptions<any>, 'props'>;
plugin?: Pick<GlobalMountOptions, 'plugins'>;
mocks?: Pick<GlobalMountOptions, 'mocks'>;
},
callback?: (this: NightwatchAPI, result: Element) => void
): Awaitable<this, Element>;
launchComponentRenderer(): this;
}
}
Loading

0 comments on commit d0ae9f8

Please sign in to comment.