File tree 5 files changed +13
-8
lines changed
5 files changed +13
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " create-t3-app " : patch
3
+ ---
4
+
5
+ fix: fix types of serverEnv and clientEnv
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const serverSchema = z.object({
12
12
/**
13
13
* You can't destruct `process.env` as a regular object in the Next.js
14
14
* middleware, so you have to do it manually here.
15
- * @type {{ [k in keyof z.infer <typeof serverSchema>]: z.infer<typeof serverSchema>[k] | undefined } }
15
+ * @type {{ [k in keyof z.input <typeof serverSchema>]: string | undefined } }
16
16
*/
17
17
export const serverEnv = {
18
18
NODE_ENV : process . env . NODE_ENV ,
@@ -31,7 +31,7 @@ export const clientSchema = z.object({
31
31
* You can't destruct `process.env` as a regular object, so you have to do
32
32
* it manually here. This is because Next.js evaluates this at build time,
33
33
* and only used environment variables are included in the build.
34
- * @type {{ [k in keyof z.infer <typeof clientSchema>]: z.infer<typeof clientSchema>[k] | undefined } }
34
+ * @type {{ [k in keyof z.input <typeof clientSchema>]: string | undefined } }
35
35
*/
36
36
export const clientEnv = {
37
37
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const serverSchema = z.object({
26
26
/**
27
27
* You can't destruct `process.env` as a regular object in the Next.js
28
28
* middleware, so you have to do it manually here.
29
- * @type {{ [k in keyof z.infer <typeof serverSchema>]: z.infer<typeof serverSchema>[k] | undefined } }
29
+ * @type {{ [k in keyof z.input <typeof serverSchema>]: string | undefined } }
30
30
*/
31
31
export const serverEnv = {
32
32
DATABASE_URL : process . env . DATABASE_URL ,
@@ -50,7 +50,7 @@ export const clientSchema = z.object({
50
50
* You can't destruct `process.env` as a regular object, so you have to do
51
51
* it manually here. This is because Next.js evaluates this at build time,
52
52
* and only used environment variables are included in the build.
53
- * @type {{ [k in keyof z.infer <typeof clientSchema>]: z.infer<typeof clientSchema>[k] | undefined } }
53
+ * @type {{ [k in keyof z.input <typeof clientSchema>]: string | undefined } }
54
54
*/
55
55
export const clientEnv = {
56
56
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const serverSchema = z.object({
25
25
/**
26
26
* You can't destruct `process.env` as a regular object in the Next.js
27
27
* middleware, so you have to do it manually here.
28
- * @type {{ [k in keyof z.infer <typeof serverSchema>]: z.infer<typeof serverSchema>[k] | undefined } }
28
+ * @type {{ [k in keyof z.input <typeof serverSchema>]: string | undefined } }
29
29
*/
30
30
export const serverEnv = {
31
31
NODE_ENV : process . env . NODE_ENV ,
@@ -48,7 +48,7 @@ export const clientSchema = z.object({
48
48
* You can't destruct `process.env` as a regular object, so you have to do
49
49
* it manually here. This is because Next.js evaluates this at build time,
50
50
* and only used environment variables are included in the build.
51
- * @type {{ [k in keyof z.infer <typeof clientSchema>]: z.infer<typeof clientSchema>[k] | undefined } }
51
+ * @type {{ [k in keyof z.input <typeof clientSchema>]: string | undefined } }
52
52
*/
53
53
export const clientEnv = {
54
54
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const serverSchema = z.object({
13
13
/**
14
14
* You can't destruct `process.env` as a regular object in the Next.js
15
15
* middleware, so you have to do it manually here.
16
- * @type {{ [k in keyof z.infer <typeof serverSchema>]: z.infer<typeof serverSchema>[k] | undefined } }
16
+ * @type {{ [k in keyof z.input <typeof serverSchema>]: string | undefined } }
17
17
*/
18
18
export const serverEnv = {
19
19
DATABASE_URL : process . env . DATABASE_URL ,
@@ -33,7 +33,7 @@ export const clientSchema = z.object({
33
33
* You can't destruct `process.env` as a regular object, so you have to do
34
34
* it manually here. This is because Next.js evaluates this at build time,
35
35
* and only used environment variables are included in the build.
36
- * @type {{ [k in keyof z.infer <typeof clientSchema>]: z.infer<typeof clientSchema>[k] | undefined } }
36
+ * @type {{ [k in keyof z.input <typeof clientSchema>]: string | undefined } }
37
37
*/
38
38
export const clientEnv = {
39
39
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
You can’t perform that action at this time.
0 commit comments