Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove any type in DiffView and ReviewCard #2373

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Remove any type in DiffView and ReviewCard #2373

merged 1 commit into from
Sep 30, 2022

Conversation

bryanjenningz
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented Sep 30, 2022

@bryanjenningz is attempting to deploy a commit to the c0d3-prod Team on Vercel.

A member of the Team first needs to authorize it.

@@ -60,7 +60,7 @@ const ReviewButtons: React.FC<{
const [addComment] = useAddCommentMutation()
const [accept] = useMutation(ACCEPT_SUBMISSION)
const [reject] = useMutation(REJECT_SUBMISSION)
const reviewSubmission = (review: any) => async () => {
const reviewSubmission = (review: typeof accept) => async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When reviewSubmission is called, the review argument will be either accept or reject which both have the same type, so we can simply put typeof accept or typeof reject here instead of any.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #2373 (466fcbd) into master (498f5f0) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2373   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          183       183           
  Lines         3208      3208           
  Branches       848       848           
=========================================
  Hits          3208      3208           
Impacted Files Coverage Δ
components/DiffView.tsx 100.00% <100.00%> (ø)
components/ReviewCard.tsx 100.00% <100.00%> (ø)

@vercel
Copy link

vercel bot commented Sep 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
c0d3-app ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 2:38PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants