// TypeScript Version: 3.3 declare module 'ember-cli-page-object' { import { Component, Definition, FindOptions, TriggerOptions, GetterDescriptor, MethodDescriptor, DSL } from 'ember-cli-page-object/-private'; export function create>(definition?: T): Component; export function collection>(scope: string, definition?: T): Collection; // Attributes export function attribute(attributeName: string, scope?: string, options?: FindOptions): GetterDescriptor; export function isVisible(scope?: string, options?: FindOptions): GetterDescriptor; export function isHidden(scope?: string, options?: FindOptions): GetterDescriptor; export function isPresent(scope?: string, options?: FindOptions): GetterDescriptor; export function text(scope?: string, options?: FindOptions & { normalize?: boolean }): GetterDescriptor; export function value(scope?: string, options?: FindOptions): GetterDescriptor; export function property(name: string, scope?: string, options?: FindOptions): GetterDescriptor; export function hasClass(className: string, scope?: string, options?: FindOptions): GetterDescriptor; export function notHasClass(className: string, scope?: string, options?: FindOptions): GetterDescriptor; export function contains(scope?: string, options?: FindOptions): (text: string) => GetterDescriptor; export function count(scope?: string, options?: FindOptions): () => GetterDescriptor; // Actions export function clickable(scope?: string, userOptions?: FindOptions): MethodDescriptor<(this: T) => T>; export function clickOnText(scope?: string, userOptions?: FindOptions): MethodDescriptor<(this: T, text: string) => T>; export function fillable(scope?: string, userOptions?: FindOptions): MethodDescriptor<(this: T, clueOrContent: string, content?: string) => T>; export function selectable(scope?: string, userOptions?: FindOptions): MethodDescriptor<(this: T, clueOrContent: string, content?: string) => T>; export function triggerable(event: string, scope?: string, eventOptions?: TriggerOptions, options?: FindOptions): MethodDescriptor<(this: T, options?: {}) => T>; export function focusable(scope?: string, options?: FindOptions): MethodDescriptor<(this: T) => T>; export function blurrable(scope?: string, options?: FindOptions): MethodDescriptor<(this: T) => T>; export function visitable(path: string): MethodDescriptor<(this: T, dynamicSegmentsAndQueryParams?: {}) => T>; export interface Collection { (scope: string, definition?: T): Array>; [i: number]: Component; [Symbol.iterator](): Iterator>; filter(callback: (c: Component) => boolean): Array>; filterBy(propName: keyof T | keyof DSL, value?: any): Array>; findOne(callback: (c: Component) => boolean): Component; findOneBy(propName: keyof T | keyof DSL, value: any): Component; forEach(callback: (c: Component, i: number) => void): void; map(callback: (c: Component) => S): S[]; mapBy(propName: keyof T | keyof DSL): any[]; objectAt(i: number): Component; toArray(): Array>; } const PageObject: { create: typeof create, attribute: typeof attribute, isVisible: typeof isVisible, isHidden: typeof isHidden, isPresent: typeof isPresent, text: typeof text, value: typeof value, property: typeof property, hasClass: typeof hasClass, notHasClass: typeof notHasClass, contains: typeof contains, count: typeof count, clickable: typeof clickable, clickOnText: typeof clickOnText, fillable: typeof fillable, selectable: typeof selectable, triggerable: typeof triggerable, focusable: typeof focusable, blurrable: typeof blurrable, visitable: typeof visitable, } export default PageObject; } declare module 'ember-cli-page-object/extend' { import type * as JQuery from 'jquery'; import { Component, FindOptions, FindOneOptions } 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 findOne(pageObject: Component, scope?: string, options?: FindOneOptions): Element; function findMany(pageObject: Component, scope?: string, options?: FindOptions): Element[]; } declare module 'ember-cli-page-object/macros' { import { Component, GetterDescriptor } from 'ember-cli-page-object/-private'; function getter

, T = any> (body: (this: Component

, key: string) => T) : GetterDescriptor; function alias(path: string, options?: { chainable: boolean }): any; } declare module 'ember-cli-page-object/adapter' { export default class Adapter {} } declare module 'ember-cli-page-object/adapters/rfc268' { import Adapter from 'ember-cli-page-object/adapter'; export default class RFC268Adapter extends Adapter {} } declare module 'ember-cli-page-object/adapters' { import Adapter from 'ember-cli-page-object/adapter'; export function setAdapter(adapter: Adapter): void } declare module 'ember-cli-page-object/-private' { import type * as JQuery from 'jquery'; interface GetterDescriptor { isGetter: true; get: T; } interface MethodDescriptor(this: S, ...args: any[]) => S> { isMethod: true; (...args: Parameters): ReturnType; get(): T; } type Component = UnpackedDefinition & DSL & { [s: string]: unknown; }; type UnpackedDefinition = { [k in keyof T]: T[k] extends GetterDescriptor ? C : T[k] extends MethodDescriptor ? C : T[k] extends Function | Component ? T[k] : T[k] extends object ? Component : T[k] }; interface DSL { isHidden?: boolean; isPresent?: boolean; isVisible?: boolean; text?: string; value?: string; contains(textToSearch: string): boolean; blur(): Component; click(): Component; clickOn(text: string): Component; fillIn(clueOrContent: string, content?: string): Component; focus(): Component; then( onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any ): Component; } interface Definition extends SelectorQueryOptions { scope?: string; [l: string]: unknown; } interface FindOptions extends FindOneOptions { multiple?: boolean; } interface FindOneOptions extends DomElementQueryOptions { contains?: string; scope?: string; last?: boolean; visible?: boolean; at?: number; } interface TriggerOptions extends FindOptions { eventProperties?: object; } interface DomElementQueryOptions extends SelectorQueryOptions { pageObjectKey?: string; } interface SelectorQueryOptions { resetScope?: boolean; testContainer?: string|HTMLElement|JQuery; } }