chore: fix all Typescript warnings (#8618)

* [CAL-1517] fix all Typescript warnings

* solve conflicts

* Update stripeCheckoutSession.handler.ts

Parse is a guard, so even though the variable is unused the parse itself is needed.

* Update ToolbarPlugin.tsx

Don't change dependency tree

---------

Co-authored-by: gitstart-calcom <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-06-06 11:59:57 +00:00
1 parent 87e1ad7115
commit 2dbc73c75b
106 files changed
+425 -319

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next";
import type { Session } from "next-auth";
import type { serverSideTranslations } from "next-i18next/serverSideTranslations";
@@ -1,5 +1,3 @@
import { reverse } from "lodash";
import { prisma } from "@calcom/prisma";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
@@ -55,7 +53,7 @@ export const eventTypeOrderHandler = async ({ ctx, input }: EventTypeOrderOption
});
}
await Promise.all(
reverse(input.ids).map((id, position) => {
input.ids.reverse().map((id, position) => {
return prisma.eventType.update({
where: {
id,
@@ -11,7 +11,7 @@ export const stripeCheckoutSessionHandler = async ({ input }: StripeCheckoutSess
const { checkoutSessionId, stripeCustomerId } = input;
// Moved the following data checks to superRefine
const validationResult = ZStripeCheckoutSessionInputSchema.parse(input);
ZStripeCheckoutSessionInputSchema.parse(input);
let customerId: string;
let isPremiumUsername = false;
@@ -10,7 +10,7 @@ type EditOptions = {
input: TEditInputSchema;
};
export const editHandler = async ({ ctx, input }: EditOptions) => {
export const editHandler = async ({ input }: EditOptions) => {
const { id, ...data } = input;
const webhook = await prisma.webhook.findFirst({