Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
parent
ac7f69216e
commit
61a63e47f4
359 changed files with 1621 additions and 1353 deletions
|
@ -28,6 +28,16 @@ import BaseDialog from "./BaseDialog";
|
|||
import defaultDispatcher from "../../../dispatcher/dispatcher";
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
|
||||
type DialogAesthetics = Partial<{
|
||||
[x in AuthType]: {
|
||||
[x: number]: {
|
||||
body: string;
|
||||
continueText?: string;
|
||||
continueKind?: string;
|
||||
};
|
||||
};
|
||||
}>;
|
||||
|
||||
interface IProps {
|
||||
onFinished: (success: boolean) => void;
|
||||
}
|
||||
|
@ -46,7 +56,7 @@ interface IState {
|
|||
}
|
||||
|
||||
export default class DeactivateAccountDialog extends React.Component<IProps, IState> {
|
||||
public constructor(props) {
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
|
@ -65,7 +75,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
|
|||
this.initAuth(/* shouldErase= */ false);
|
||||
}
|
||||
|
||||
private onStagePhaseChange = (stage: AuthType, phase: string): void => {
|
||||
private onStagePhaseChange = (stage: AuthType, phase: number): void => {
|
||||
const dialogAesthetics = {
|
||||
[SSOAuthEntry.PHASE_PREAUTH]: {
|
||||
body: _t("Confirm your account deactivation by using Single Sign On to prove your identity."),
|
||||
|
@ -80,7 +90,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
|
|||
};
|
||||
|
||||
// This is the same as aestheticsForStagePhases in InteractiveAuthDialog minus the `title`
|
||||
const DEACTIVATE_AESTHETICS = {
|
||||
const DEACTIVATE_AESTHETICS: DialogAesthetics = {
|
||||
[SSOAuthEntry.LOGIN_TYPE]: dialogAesthetics,
|
||||
[SSOAuthEntry.UNSTABLE_LOGIN_TYPE]: dialogAesthetics,
|
||||
[PasswordAuthEntry.LOGIN_TYPE]: {
|
||||
|
@ -96,9 +106,9 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
|
|||
let continueKind = null;
|
||||
if (aesthetics) {
|
||||
const phaseAesthetics = aesthetics[phase];
|
||||
if (phaseAesthetics && phaseAesthetics.body) bodyText = phaseAesthetics.body;
|
||||
if (phaseAesthetics && phaseAesthetics.continueText) continueText = phaseAesthetics.continueText;
|
||||
if (phaseAesthetics && phaseAesthetics.continueKind) continueKind = phaseAesthetics.continueKind;
|
||||
if (phaseAesthetics?.body) bodyText = phaseAesthetics.body;
|
||||
if (phaseAesthetics?.continueText) continueText = phaseAesthetics.continueText;
|
||||
if (phaseAesthetics?.continueKind) continueKind = phaseAesthetics.continueKind;
|
||||
}
|
||||
this.setState({ bodyText, continueText, continueKind });
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue