diff --git a/src/components/excel/Excel.ts b/src/components/excel/Excel.ts index 4c30f9a..2e72cd2 100644 --- a/src/components/excel/Excel.ts +++ b/src/components/excel/Excel.ts @@ -5,9 +5,10 @@ import { Store } from 'core/store/Store'; import { StoreSubscriber } from 'core/StoreSubscriber'; import { updateOpenDate } from 'redux/action-creators'; +// TODO type for components array interface ExcelOptionsType { components: any[], - store: any, + store: Store, } type BaseComponentOption = { diff --git a/src/components/header/Header.ts b/src/components/header/Header.ts index a291671..0cdb016 100644 --- a/src/components/header/Header.ts +++ b/src/components/header/Header.ts @@ -17,10 +17,11 @@ export class Header extends ExcelComponent { } toHTML(): string { - const { title } = this.store.getState(); + const { title, id } = this.store.getState(); return ` +
Пока не создали ни одной таблицы
'; diff --git a/src/pages/ExcelPage.ts b/src/pages/ExcelPage.ts index 03e466b..c59964f 100644 --- a/src/pages/ExcelPage.ts +++ b/src/pages/ExcelPage.ts @@ -19,7 +19,7 @@ export class ExcelPage extends AbstractPage { private storeSub: SubscribeType | null; private processor: StateProcessor; - constructor(props: any) { + constructor(props: string[]) { super(props); this.storeSub = null; diff --git a/src/redux/action-creators.ts b/src/redux/action-creators.ts index c307e1e..0d5d16e 100644 --- a/src/redux/action-creators.ts +++ b/src/redux/action-creators.ts @@ -1,3 +1,4 @@ +import { ResizeReturnDataType } from 'components/table/handlers/table.resize'; import { ActionType } from 'redux/types'; import { CHANGE_TEXT, @@ -9,42 +10,42 @@ import { UPDATE_DATE, CHANGE_CURRENT_TEXT, } from 'redux/action-constants'; -export function tableResize(resizeData: any) { +export function tableResize(resizeData: ResizeReturnDataType): ActionType { return { type: TABLE_RESIZE, - ...resizeData, + resizeData, }; } -export function changeText(data: { text: string, id: string }) { +export function changeText(data: { text: string, id: string }): ActionType { return { type: CHANGE_TEXT, data, }; } -export function changeCurrentStyles(data: any) { +export function changeCurrentStyles(data: Partial