Skip to content

Commit

Permalink
remove now-unneeded type annotation
Browse files Browse the repository at this point in the history
the benefits of proper code types
  • Loading branch information
3vorp committed Feb 23, 2024
1 parent b45f1f1 commit 883605b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v2/repository/contributions.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default class ContributionFirestormRepository implements ContributionsRep
return contributions.add(params).then((id) => contributions.get(id));
}

addContributions(params: ContributionCreationParams[]): Promise<Contribution[]> {
addContributions(params: ContributionCreationParams[]): Promise<Contributions> {
return contributions
.addBulk(params)
.then((ids) => Promise.all(ids.map((id) => contributions.get(id))));
Expand Down
2 changes: 1 addition & 1 deletion src/v2/repository/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class UserFirestormRepository implements UserRepository {
.select({ fields: ["id", "username", "uuid", "anonymous"] })
// calling Object.values as a callback gets rid of type inference
.then((res) => Object.values(res))
.then((_users: Pick<User, "id" | "username" | "uuid" | "anonymous">[]) =>
.then((_users) =>
_users.map((el) => ({
id: el.id,
username: el.anonymous ? undefined : el.username,
Expand Down

0 comments on commit 883605b

Please sign in to comment.