mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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 {DummyAuth} from "./stages/DummyAuth";
|
||||||
import {TermsAuth} from "./stages/TermsAuth";
|
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) {
|
switch (type) {
|
||||||
case "m.login.dummy":
|
case "m.login.dummy":
|
||||||
return DummyAuth;
|
return DummyAuth;
|
||||||
|
Loading…
Reference in New Issue
Block a user