Skip to content

Commit

Permalink
Remove any type (#122)
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Marminge <julius0216@outlook.com>
  • Loading branch information
chungweileong94 and juliusmarminge committed Oct 16, 2023
1 parent cb72fa9 commit 632d183
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/itchy-roses-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@t3-oss/env-nextjs": patch
"@t3-oss/env-nuxt": patch
---

Remove `any` type
6 changes: 2 additions & 4 deletions packages/nextjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function createEnv<
>(opts: Options<TServer, TClient, TShared>) {
const client = typeof opts.client === "object" ? opts.client : {};
const server = typeof opts.server === "object" ? opts.server : {};
const shared = typeof opts.shared === "object" ? opts.shared : {};
const shared = opts.shared;

const runtimeEnv = opts.runtimeEnv
? opts.runtimeEnv
Expand All @@ -72,9 +72,7 @@ export function createEnv<

return createEnvCore<ClientPrefix, TServer, TClient, TShared>({
...opts,
// FIXME: don't require this `as any` cast
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
shared: shared as any,
shared,
client,
server,
clientPrefix: CLIENT_PREFIX,
Expand Down
6 changes: 2 additions & 4 deletions packages/nuxt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ export function createEnv<
>(opts: Options<TServer, TClient, TShared>) {
const client = typeof opts.client === "object" ? opts.client : {};
const server = typeof opts.server === "object" ? opts.server : {};
const shared = typeof opts.shared === "object" ? opts.shared : {};
const shared = opts.shared;

return createEnvCore<ClientPrefix, TServer, TClient, TShared>({
...opts,
// FIXME: don't require this `as any` cast
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
shared: shared as any,
shared,
client,
server,
clientPrefix: CLIENT_PREFIX,
Expand Down

2 comments on commit 632d183

@vercel
Copy link

@vercel vercel bot commented on 632d183 Oct 16, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

t3-env-nextjs – ./examples/nextjs

t3-env-nextjs.vercel.app
t3-env-nextjs-t3-oss.vercel.app
t3-env-nextjs-git-main-t3-oss.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 632d183 Oct 16, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

t3-env – ./docs

t3-env-git-main-t3-oss.vercel.app
env.t3.wtf
env.t3.gg
t3-env.vercel.app
t3-env-t3-oss.vercel.app

Please sign in to comment.