Skip to content

Commit

Permalink
Fix errors import in other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Mar 7, 2024
1 parent cf7d7d9 commit 1070313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions packages/auth-remix/src/server.ts
Expand Up @@ -8,7 +8,6 @@ import {
type TokenData,
type emailPasswordProviderName,
ConfigurationError,
MissingConfigurationError,
InvalidDataError,
PKCEError,
BackendError,
Expand All @@ -17,7 +16,7 @@ import {
} from "@edgedb/auth-core";
import { type RemixAuthOptions, RemixClientAuth } from "./client.js";

export * from "@edgedb/auth-core/dist/errors.js";
export * from "@edgedb/auth-core/errors";
export type { TokenData, RemixAuthOptions };

export type BuiltinProviderNames =
Expand All @@ -31,7 +30,10 @@ export default function createServerAuth(
return new RemixServerAuth(client, options);
}

type ParamsOrError<Result extends object, ErrorDetails extends object = {}> =
type ParamsOrError<
Result extends object,
ErrorDetails extends object = object
> =
| ({ error: null } & { [Key in keyof ErrorDetails]?: undefined } & Result)
| ({ error: Error } & ErrorDetails & { [Key in keyof Result]?: undefined });

Expand Down
7 changes: 5 additions & 2 deletions packages/auth-sveltekit/src/server.ts
Expand Up @@ -25,14 +25,17 @@ import {
type AuthOptions,
} from "./client.js";

export * from "@edgedb/auth-core/dist/errors.js";
export * from "@edgedb/auth-core/errors";
export type { TokenData, AuthOptions, Client };

export type BuiltinProviderNames =
| BuiltinOAuthProviderNames
| typeof emailPasswordProviderName;

type ParamsOrError<Result extends object, ErrorDetails extends object = {}> =
type ParamsOrError<
Result extends object,
ErrorDetails extends object = object
> =
| ({ error: null } & { [Key in keyof ErrorDetails]?: undefined } & Result)
| ({ error: Error } & ErrorDetails & { [Key in keyof Result]?: undefined });

Expand Down

0 comments on commit 1070313

Please sign in to comment.