diff --git a/packages/start/src/client/envOnly.ts b/packages/start/src/client/envOnly.ts index 55a6f33338..2b444578c2 100644 --- a/packages/start/src/client/envOnly.ts +++ b/packages/start/src/client/envOnly.ts @@ -1,17 +1,9 @@ +type EnvOnlyFn = ) => any>(fn: TFn) => TFn + // A function that will only be available in the server build // If called on the client, it will throw an error - -export function serverOnly) => any>( - fn: TFn, -): TFn { - return fn -} +export const serverOnly: EnvOnlyFn = (fn) => fn // A function that will only be available in the client build // If called on the server, it will throw an error - -export function clientOnly) => any>( - fn: TFn, -): TFn { - return fn -} +export const clientOnly: EnvOnlyFn = (fn) => fn