Skip to content

Commit

Permalink
refactor(compensations): full arrow function argument names
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Sep 12, 2024
1 parent dbc3daf commit 8f50749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compensations/utils/salary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function salariesFromLocation(
salariesByLocation: SalariesByLocation[],
): Result<Salaries, string> {
const yearlySalaries = salariesByLocation.find(
(s) => s.location._ref === locationId,
(salary) => salary.location._ref === locationId,
)?.yearlySalaries;
if (yearlySalaries === undefined) {
return ResultError(`Could not find salaries for location '${locationId}'`);
Expand Down
8 changes: 4 additions & 4 deletions studio/components/salariesInput/utils/parseSalaries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export interface Salaries {
[year: string]: number;
}

export function isSalariesType(o: unknown): o is Salaries {
export function isSalariesType(value: unknown): value is Salaries {
return (
typeof o === "object" &&
o !== null &&
Object.entries(o).every(
typeof value === "object" &&
value !== null &&
Object.entries(value).every(
([k, v]) => !isNaN(Number(k)) && typeof v === "number",
)
);
Expand Down

0 comments on commit 8f50749

Please sign in to comment.