mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Refactor type
- Change name - Move union type down
This commit is contained in:
parent
1d4b079d0c
commit
3a67da8830
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user