Skip to content

Commit

Permalink
Merge pull request #627 from ro0gr/types/multiple-option-cleanup
Browse files Browse the repository at this point in the history
types: fix `multiple` leaks
  • Loading branch information
ro0gr authored Oct 15, 2023
2 parents 1119e05 + d510539 commit 4eeda73
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions addon/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ declare module 'ember-cli-page-object' {
declare module 'ember-cli-page-object/extend' {
import type * as JQuery from 'jquery';

import { Component, FindOptions, FindOneOptions } from 'ember-cli-page-object/-private';
import { Component, FindElementOptions, FindOptions } from 'ember-cli-page-object/-private';

function findElement(pageObject: Component, scope?: string, options?: FindOptions): JQuery;
function findElementWithAssert(pageObject: Component, scope?: string, options?: FindOptions): JQuery;
function findElement(pageObject: Component, scope?: string, options?: FindElementOptions): JQuery;
function findElementWithAssert(pageObject: Component, scope?: string, options?: FindElementOptions): JQuery;

function findOne(pageObject: Component, scope?: string, options?: FindOneOptions): Element;
function findOne(pageObject: Component, scope?: string, options?: FindOptions): Element;
function findMany(pageObject: Component, scope?: string, options?: FindOptions): Element[];
}

Expand Down Expand Up @@ -173,16 +173,12 @@ declare module 'ember-cli-page-object/-private' {
[l: string]: unknown;
}

interface FindOptions extends FindOneOptions {
interface FindElementOptions extends FindOptions {
multiple?: boolean;
}

interface FindOneOptions extends DomElementQueryOptions {
contains?: string;
interface FindOptions extends DomElementQueryOptions, QueryFilterOptions {
scope?: string;
last?: boolean;
visible?: boolean;
at?: number;
}

interface TriggerOptions extends FindOptions {
Expand All @@ -197,4 +193,11 @@ declare module 'ember-cli-page-object/-private' {
resetScope?: boolean;
testContainer?: string|HTMLElement|JQuery;
}

interface QueryFilterOptions {
at?: number;
contains?: string;
last?: boolean;
visible?: boolean;
}
}

0 comments on commit 4eeda73

Please sign in to comment.