Skip to content

Commit

Permalink
[page_objects/common_page] convert to ts (#50771) (#50968)
Browse files Browse the repository at this point in the history
* [page_objects/common_page] convert to ts

* fix lint errors

* descrease navigation timeouts

* use template literal for log messages
  • Loading branch information
dmlemeshko committed Nov 18, 2019
1 parent 49470d4 commit 79da1e2
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Config {
this[$values] = value;
}

public has(key: string) {
public has(key: string | string[]) {
function recursiveHasCheck(
remainingPath: string[],
values: Record<string, any>,
Expand Down Expand Up @@ -109,7 +109,7 @@ export class Config {
return recursiveHasCheck(path, this[$values], schema);
}

public get(key: string, defaultValue?: any) {
public get(key: string | string[], defaultValue?: any) {
if (!this.has(key)) {
throw new Error(`Unknown config key "${key}"`);
}
Expand Down
Loading

0 comments on commit 79da1e2

Please sign in to comment.