Refactor type
- Change name - Move union type down
This commit is contained in:
parent
1d4b079d0c
commit
3a67da8830
1 changed files with 2 additions and 2 deletions
|
@ -20,9 +20,9 @@ import type {RegistrationDetails} from "./Registration";
|
|||
import {DummyAuth} from "./stages/DummyAuth";
|
||||
import {TermsAuth} from "./stages/TermsAuth";
|
||||
|
||||
type DerivedFromBaseRegistration = { new(hsApi: HomeServerApi, registrationData: RegistrationDetails, session: string, params?: Record<string, any>): BaseRegistrationStage } & typeof BaseRegistrationStage | undefined;
|
||||
type ClassDerivedFromBaseRegistration = { new(hsApi: HomeServerApi, registrationData: RegistrationDetails, session: string, params?: Record<string, any>): BaseRegistrationStage } & typeof BaseRegistrationStage;
|
||||
|
||||
export function registrationStageFromType(type: string): DerivedFromBaseRegistration {
|
||||
export function registrationStageFromType(type: string): ClassDerivedFromBaseRegistration | undefined{
|
||||
switch (type) {
|
||||
case "m.login.dummy":
|
||||
return DummyAuth;
|
||||
|
|
Reference in a new issue