Skip to content

Commit

Permalink
style: 2021-09-20 linter warnings batch 17 / 26; part 2
Browse files Browse the repository at this point in the history
Fixes #2092

Signed-off-by: adrianbatuto <adrian.batuto@accenture.com>
  • Loading branch information
adrianbatuto committed May 15, 2023
1 parent f37495c commit 69aac58
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ export class BambooHarvestConverter {
* @param arr The array containing the values of properties describing a
* `BambooHarvest` model entity.
*/
public static ofSolidityStruct(arr: any[]): BambooHarvest {
public static ofSolidityStruct(arr: unknown[]): BambooHarvest {
return {
id: arr[BambooHarvestConverter.SOLIDITY_FIELD_ID],
location: arr[BambooHarvestConverter.SOLIDITY_FIELD_LOCATION],
startedAt: arr[BambooHarvestConverter.SOLIDITY_FIELD_STARTED_AT],
endedAt: arr[BambooHarvestConverter.SOLIDITY_FIELD_ENDED_AT],
harvester: arr[BambooHarvestConverter.SOLIDITY_FIELD_HARVESTER],
id: arr[BambooHarvestConverter.SOLIDITY_FIELD_ID] as string,
location: arr[BambooHarvestConverter.SOLIDITY_FIELD_LOCATION] as string,
startedAt: arr[
BambooHarvestConverter.SOLIDITY_FIELD_STARTED_AT
] as string,
endedAt: arr[BambooHarvestConverter.SOLIDITY_FIELD_ENDED_AT] as string,
harvester: arr[BambooHarvestConverter.SOLIDITY_FIELD_HARVESTER] as string,
};
}

public static ofSolidityStructList(arrayOfArrays: any[][]): BambooHarvest[] {
public static ofSolidityStructList(
arrayOfArrays: unknown[][],
): BambooHarvest[] {
return arrayOfArrays.map(BambooHarvestConverter.ofSolidityStruct);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ export class BookshelfConverter {
* @param arr The array containing the values of properties describing a
* `Bookshelf` model entity.
*/
public static ofSolidityStruct(arr: any[]): Bookshelf {
public static ofSolidityStruct(arr: unknown[]): Bookshelf {
return {
id: arr[BookshelfConverter.SOLIDITY_FIELD_ID],
shelfCount: arr[BookshelfConverter.SOLIDITY_FIELD_SHELF_COUNT],
bambooHarvestId: arr[BookshelfConverter.SOLIDITY_FIELD_BAMBOO_HARVEST_ID],
id: arr[BookshelfConverter.SOLIDITY_FIELD_ID] as string,
shelfCount: arr[BookshelfConverter.SOLIDITY_FIELD_SHELF_COUNT] as number,
bambooHarvestId: arr[
BookshelfConverter.SOLIDITY_FIELD_BAMBOO_HARVEST_ID
] as string,
};
}

public static ofSolidityStructList(arrayOfArrays: any[][]): Bookshelf[] {
public static ofSolidityStructList(arrayOfArrays: unknown[][]): Bookshelf[] {
return arrayOfArrays.map(BookshelfConverter.ofSolidityStruct);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export class BambooHarvestDetailPage implements OnInit {
});
}

public onClickFormSubmit(value: any): void {
public onClickFormSubmit(value: unknown): void {
this.log.debug("form submitted", value);
this.bambooHarvest = value;
this.bambooHarvest = value as BambooHarvest;
this.modalController.dismiss(this.bambooHarvest);
}

Expand Down

0 comments on commit 69aac58

Please sign in to comment.