Commit 260557b8 authored by Kristian Freeman's avatar Kristian Freeman

Fix types and type plain objects

parent 704e4a9b
......@@ -41,7 +41,7 @@ const addWidget = (state: IApplicationState): IApplicationState => {
let newState: { [name: string]: any };
if (qaCheck()) {
const newWidget = { created: Date.now() };
const newWidget: IWidget = { created: Date.now() };
const newWidgetsInventory = [].concat(state.widgets, newWidget);
newState = {
error: null,
......@@ -64,7 +64,7 @@ const qaCheck = (): boolean => {
};
const generateOrder = (state: IApplicationState): IApplicationState => {
const newOrder = {
const newOrder: IOrder = {
created: Date.now(),
widgets: Math.floor(Math.random() * 10) + 1,
};
......
......@@ -29,14 +29,14 @@ interface IMaterialSet {
}
interface IOrder {
created: Date;
created: number;
widgets: number;
}
type IThunkedAction = (dispatch: Dispatch<IApplicationState>, getState: () => IApplicationState) => void;
interface IWidget {
created: Date;
created: number;
}
export {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment