Fix babel warnings about ts types re-export

This commit is contained in:
SleepWalker
2019-12-25 12:01:12 +02:00
parent f72c880ad1
commit 8db75ac8c8
8 changed files with 446 additions and 9 deletions

View File

@@ -1,2 +1,5 @@
export { State as AccountsState, Account } from './reducer';
import { State, Account as AccountType } from './reducer';
export { default as AccountSwitcher } from './AccountSwitcher';
export type AccountsState = State;
export type Account = AccountType;

View File

@@ -1 +1,3 @@
export { State as AuthState } from './reducer';
import { State } from './reducer';
export type AuthState = State;

View File

@@ -1,2 +1,4 @@
import { MfaStep as TMfaStep } from './MfaEnable';
export { default } from './MultiFactorAuth';
export { MfaStep } from './MfaEnable';
export type MfaStep = TMfaStep;

View File

@@ -1 +1,3 @@
export { User } from './reducer';
import { User as TUser } from './reducer';
export type User = TUser;

View File

@@ -1,4 +1,4 @@
import AuthFlow, { ActionsDict } from './AuthFlow';
import AuthFlow, { ActionsDict, AuthContext as TAuthContext } from './AuthFlow';
import * as actions from 'app/components/auth/actions';
@@ -34,5 +34,5 @@ const availableActions = {
setLoadingState: actions.setLoadingState,
};
export { AuthContext } from './AuthFlow';
export type AuthContext = TAuthContext;
export default new AuthFlow(availableActions as ActionsDict);

View File

@@ -1,10 +1,15 @@
export { default, Resp } from './request';
export { Middleware } from './PromiseMiddlewareLayer';
import { Resp as TResp } from './request';
import { Middleware as TMiddleware } from './PromiseMiddlewareLayer';
export { default } from './request';
export { default as InternalServerError } from './InternalServerError';
export { default as RequestAbortedError } from './RequestAbortedError';
export type Resp<T> = TResp<T>;
export type Middleware = TMiddleware;
/**
* Usage: Query<'requeired'|'keys'|'names'>
* Usage: Query<'required'|'keys'|'names'>
* TODO: find a way to make it more friendly with URLSearchParams type
*/
export type Query<T extends string> = {