Update IdentityGenerator return type (#1010)

This commit is contained in:
Leendert de Borst
2025-07-26 22:38:09 +02:00
committed by Leendert de Borst
parent 7da8189789
commit 0dac97f4ff
4 changed files with 5 additions and 5 deletions

View File

@@ -137,7 +137,7 @@ declare class UsernameEmailGenerator {
* @param language - The language to use for generating the identity (e.g. "en", "nl").
* @returns A new identity generator instance.
*/
declare const CreateIdentityGenerator: (language: string) => IIdentityGenerator;
declare const CreateIdentityGenerator: (language: string) => IdentityGenerator;
/**
* Creates a new username email generator. This is used by the .NET Blazor WASM JSinterop

View File

@@ -137,7 +137,7 @@ declare class UsernameEmailGenerator {
* @param language - The language to use for generating the identity (e.g. "en", "nl").
* @returns A new identity generator instance.
*/
declare const CreateIdentityGenerator: (language: string) => IIdentityGenerator;
declare const CreateIdentityGenerator: (language: string) => IdentityGenerator;
/**
* Creates a new username email generator. This is used by the .NET Blazor WASM JSinterop

View File

@@ -137,7 +137,7 @@ declare class UsernameEmailGenerator {
* @param language - The language to use for generating the identity (e.g. "en", "nl").
* @returns A new identity generator instance.
*/
declare const CreateIdentityGenerator: (language: string) => IIdentityGenerator;
declare const CreateIdentityGenerator: (language: string) => IdentityGenerator;
/**
* Creates a new username email generator. This is used by the .NET Blazor WASM JSinterop

View File

@@ -1,13 +1,13 @@
import { IdentityGenerator } from "src/implementations/base/IdentityGenerator";
import { IdentityGeneratorEn } from "src/implementations/IdentityGeneratorEn";
import { IdentityGeneratorNl } from "src/implementations/IdentityGeneratorNl";
import { IIdentityGenerator } from "src/interfaces/IIdentityGenerator";
/**
* Creates a new identity generator based on the language.
* @param language - The language to use for generating the identity (e.g. "en", "nl").
* @returns A new identity generator instance.
*/
export const CreateIdentityGenerator = (language: string): IIdentityGenerator => {
export const CreateIdentityGenerator = (language: string): IdentityGenerator => {
switch (language) {
case 'en':
return new IdentityGeneratorEn();