Implemented strict mode for the project (broken tests, hundreds of @ts-ignore and new errors are included) [skip ci]

This commit is contained in:
ErickSkrauch
2020-01-17 23:37:52 +03:00
committed by SleepWalker
parent 10e8b77acf
commit 96049ad4ad
151 changed files with 2470 additions and 1869 deletions

View File

@@ -7,7 +7,7 @@ import RegisterState from './RegisterState';
import { AuthContext } from './AuthFlow';
export default class LoginState extends AbstractState {
enter(context: AuthContext) {
enter(context: AuthContext): Promise<void> | void {
const login = getLogin(context.getState());
const { user } = context.getState();
@@ -30,7 +30,7 @@ export default class LoginState extends AbstractState {
payload: {
login: string;
},
) {
): Promise<void> | void {
context
.run('login', payload)
.then(() => context.setState(new PasswordState()))
@@ -39,11 +39,11 @@ export default class LoginState extends AbstractState {
);
}
reject(context: AuthContext) {
reject(context: AuthContext): void {
context.setState(new RegisterState());
}
goBack(context: AuthContext) {
goBack(context: AuthContext): void {
context.run('goBack', {
fallbackUrl: '/',
});