@qawolf/types
Advanced tools
Comparing version 0.4.4 to 0.5.0
@@ -1,2 +0,2 @@ | ||
export declare type Action = "click" | "input" | "scroll"; | ||
export declare type Action = "click" | "type" | "scroll" | "select"; | ||
export declare type Callback<S = void, T = void> = (data?: S) => T; | ||
@@ -11,2 +11,3 @@ export declare type ElementDescriptor = { | ||
inputType?: string | null; | ||
isContentEditable?: boolean | null; | ||
labels?: string[] | null; | ||
@@ -22,3 +23,3 @@ name?: string | null; | ||
export interface Event { | ||
action: Action; | ||
name: EventName; | ||
isTrusted: boolean; | ||
@@ -29,6 +30,11 @@ pageId?: number; | ||
} | ||
export declare type EventName = "click" | "input" | "keydown" | "keyup" | "paste" | "scroll"; | ||
export interface InputEvent extends Event { | ||
action: "input"; | ||
value?: string | null; | ||
name: "input"; | ||
value: string | null; | ||
} | ||
export interface KeyEvent extends Event { | ||
name: "keydown" | "keyup"; | ||
value: string; | ||
} | ||
export declare type Locator = { | ||
@@ -41,4 +47,8 @@ action: Action; | ||
}; | ||
export interface PasteEvent extends Event { | ||
name: "paste"; | ||
value: string; | ||
} | ||
export interface ScrollEvent extends Event { | ||
action: "scroll"; | ||
name: "scroll"; | ||
value: ScrollValue; | ||
@@ -45,0 +55,0 @@ } |
{ | ||
"name": "@qawolf/types", | ||
"description": "qawolf types", | ||
"version": "0.4.4", | ||
"version": "0.5.0", | ||
"license": "BSD-3.0", | ||
@@ -22,3 +22,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "46e1d99d06c223f1fa8281e957856da4a7c152f1" | ||
"gitHead": "ab0de314c354a4adb5889edd2a35a98ea7708798" | ||
} |
@@ -1,2 +0,2 @@ | ||
export type Action = "click" | "input" | "scroll"; | ||
export type Action = "click" | "type" | "scroll" | "select"; | ||
@@ -13,2 +13,3 @@ export type Callback<S = void, T = void> = (data?: S) => T; | ||
inputType?: string | null; | ||
isContentEditable?: boolean | null; | ||
labels?: string[] | null; | ||
@@ -25,3 +26,3 @@ name?: string | null; | ||
export interface Event { | ||
action: Action; | ||
name: EventName; | ||
isTrusted: boolean; | ||
@@ -33,7 +34,21 @@ pageId?: number; | ||
export type EventName = | ||
| "click" | ||
| "input" | ||
| "keydown" | ||
| "keyup" | ||
| "paste" | ||
| "scroll"; | ||
export interface InputEvent extends Event { | ||
action: "input"; | ||
value?: string | null; | ||
name: "input"; | ||
value: string | null; | ||
} | ||
export interface KeyEvent extends Event { | ||
name: "keydown" | "keyup"; | ||
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code | ||
value: string; | ||
} | ||
export type Locator = { | ||
@@ -47,4 +62,9 @@ action: Action; | ||
export interface PasteEvent extends Event { | ||
name: "paste"; | ||
value: string; | ||
} | ||
export interface ScrollEvent extends Event { | ||
action: "scroll"; | ||
name: "scroll"; | ||
value: ScrollValue; | ||
@@ -51,0 +71,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6141
152