Migrated all servers services to TS

This commit is contained in:
Alejandro Celaya
2020-08-29 14:16:37 +02:00
parent aee4c2d02f
commit 64a968711c
12 changed files with 66 additions and 53 deletions

View File

@@ -24,7 +24,7 @@ const mapActionService = (map: ActionMap, actionName: string): ActionMap => ({
// Wrap actual action service in a function so that it is lazily created the first time it is called
[actionName]: lazyService(container, actionName),
});
const connect: ConnectDecorator = (propsFromState: string[], actionServiceNames: string[] = []) =>
const connect: ConnectDecorator = (propsFromState: string[] | null, actionServiceNames: string[] = []) =>
reduxConnect(
propsFromState ? pick(propsFromState) : null,
actionServiceNames.reduce(mapActionService, {}),

View File

@@ -35,6 +35,6 @@ export interface ShlinkState {
settings: Settings;
}
export type ConnectDecorator = (props: string[], actions?: string[]) => any;
export type ConnectDecorator = (props: string[] | null, actions?: string[]) => any;
export type GetState = () => ShlinkState;