perf: improve typescript perf by pre-generating the router types (#15929)
Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
a268d8743d
commit
e7816cfb0c
9 files changed
+1141
-633
No files matched your search
@@ -157,8 +157,7 @@ export const CLOUDFLARE_SITE_ID = process.env.NEXT_PUBLIC_CLOUDFLARE_SITEKEY;
|
||||
export const MINIMUM_NUMBER_OF_ORG_SEATS = 30;
|
||||
export const ORG_SELF_SERVE_ENABLED = process.env.NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED === "1";
|
||||
export const ORG_MINIMUM_PUBLISHED_TEAMS_SELF_SERVE = 0;
|
||||
export const ORG_MINIMUM_PUBLISHED_TEAMS_SELF_SERVE_HELPER_DIALOGUE =
|
||||
2;
|
||||
export const ORG_MINIMUM_PUBLISHED_TEAMS_SELF_SERVE_HELPER_DIALOGUE = 2;
|
||||
|
||||
export const CALCOM_PRIVATE_API_ROUTE = process.env.CALCOM_PRIVATE_API_ROUTE || "https://goblin.cal.com";
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
"jsx": "preserve",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": [".", "../types/next-auth.d.ts", "../types/window.d.ts"],
|
||||
"include": [".", "../types/next-auth.d.ts", "../types/window.d.ts", "../trpc/types/router.d.ts"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
types
|
||||
@@ -8,7 +8,9 @@
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"lint": "eslint . --ext .ts,.tsx",
|
||||
"lint:fix": "eslint . --ext .ts,.tsx --fix"
|
||||
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
||||
"build": "yarn trpc:generate || true",
|
||||
"trpc:generate": "yarn tsc --project tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-query": "^5.17.15",
|
||||
@@ -18,5 +20,8 @@
|
||||
"@trpc/server": "11.0.0-next-beta.222",
|
||||
"superjson": "1.9.1",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.9.4"
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
|
||||
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
|
||||
import { getTranslation } from "@calcom/lib/server/i18n";
|
||||
import sendPayload from "@calcom/lib/server/webhooks/sendPayload";
|
||||
import { WebhookTriggerEvents } from "@calcom/prisma/enums";
|
||||
import type { CalendarEvent } from "@calcom/types/Calendar";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
{
|
||||
"extends": "@calcom/tsconfig/react-library.json",
|
||||
"include": ["client", "next", "react", "server"]
|
||||
"include": ["client", "next", "react", "server"],
|
||||
"compilerOptions": {
|
||||
"isolatedModules": false,
|
||||
"noEmit": false,
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"declarationMap": false,
|
||||
"outFile": "types/router.d.ts"
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user