Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Jul 20, 2023
1 parent b1e7ff9 commit 7749e23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/build/recipe/thirdpartyemailpassword/recipe.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Recipe extends RecipeModule {
recipeId: string,
appInfo: NormalisedAppinfo,
isInServerlessEnv: boolean,
config: TypeInput,
config: TypeInput | undefined,
recipes: {
thirdPartyInstance: ThirdPartyRecipe | undefined;
emailPasswordInstance: EmailPasswordRecipe | undefined;
Expand All @@ -39,7 +39,7 @@ export default class Recipe extends RecipeModule {
emailDelivery: EmailDeliveryIngredient<TypeThirdPartyEmailPasswordEmailDeliveryInput> | undefined;
}
);
static init(config: TypeInput): RecipeListFunction;
static init(config?: TypeInput): RecipeListFunction;
static reset(): void;
static getInstanceOrThrowError(): Recipe;
getAPIsHandled: () => APIHandled[];
Expand Down
4 changes: 2 additions & 2 deletions lib/ts/recipe/thirdpartyemailpassword/recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Recipe extends RecipeModule {
recipeId: string,
appInfo: NormalisedAppinfo,
isInServerlessEnv: boolean,
config: TypeInput,
config: TypeInput | undefined,
recipes: {
thirdPartyInstance: ThirdPartyRecipe | undefined;
emailPasswordInstance: EmailPasswordRecipe | undefined;
Expand Down Expand Up @@ -156,7 +156,7 @@ export default class Recipe extends RecipeModule {
}
}

static init(config: TypeInput): RecipeListFunction {
static init(config?: TypeInput): RecipeListFunction {
return (appInfo, isInServerlessEnv) => {
if (Recipe.instance === undefined) {
Recipe.instance = new Recipe(
Expand Down
7 changes: 7 additions & 0 deletions test/with-typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1737,3 +1737,10 @@ async function refreshSessionWithoutRequestResponse(req: express.Request, resp:
}
}
}

ThirdParty.init();
ThirdPartyEmailPassword.init();
ThirdPartyPasswordless.init({
contactMethod: "EMAIL",
flowType: "MAGIC_LINK",
});

0 comments on commit 7749e23

Please sign in to comment.