Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Commit a241bb1

Browse files
committed
making progress
1 parent 5f4edda commit a241bb1

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

src/_declare/global.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare namespace NodeJS {
2+
interface Global {
3+
document: Document;
4+
window: Window;
5+
navigator: Navigator;
6+
}
7+
}

src/_declare/hapi-webpack-plugin.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module 'hapi-webpack-plugin';

src/views/About.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@ import * as React from 'react';
22
import {connect} from 'react-redux';
33
import MetaAction from '../store/meta/MetaAction';
44
import IStore from '../interfaces/IStore';
5-
import {Dispatch} from "redux";
5+
import {Dispatch} from 'redux';
66
import IMetaReducerState from '../interfaces/reducers/IMetaReducerState';
77

8+
interface IStateToProps {
9+
}
10+
11+
interface IDispatchToProps {
12+
setMeta: (meta: IMetaReducerState) => void;
13+
}
14+
815
const mapStateToProps = (state: IStore) => ({});
916

1017
const mapDispatchToProps = (dispatch: Dispatch<any>) => ({
1118
setMeta: (meta: IMetaReducerState) => dispatch(MetaAction.setMeta(meta)),
1219
});
1320

14-
class About extends React.Component<any, void> {
21+
class About extends React.Component<IStateToProps & IDispatchToProps, any> {
1522

1623
componentWillMount(): void {
1724
this.props.setMeta({title: 'About Page'});
@@ -60,4 +67,5 @@ class About extends React.Component<any, void> {
6067

6168
}
6269

63-
export default connect(mapStateToProps, mapDispatchToProps)(About);
70+
export default connect<IStateToProps, IDispatchToProps, any>(mapStateToProps, mapDispatchToProps)(About);
71+

src/views/Home.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ const mapDispatchToProps = (dispatch: Dispatch<any>): IDispatchToProps => ({
2525
setMeta: (meta: IMetaReducerState) => dispatch(MetaAction.setMeta(meta)),
2626
});
2727

28-
29-
interface IHomeProps extends IStateToProps, IDispatchToProps {
30-
}
31-
32-
class Home extends React.Component<IStateToProps & IDispatchToProps, void> {
28+
class Home extends React.Component<IStateToProps & IDispatchToProps, any> {
3329

3430
componentWillMount(): void {
3531
this.props.setMeta({

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"sourceMap": false
4040
},
4141
"include": [
42-
"src/**/*"
42+
"src/**/*",
43+
"src/_declare/**/*"
4344
],
4445
"exclude": [
4546
"node_modules"

0 commit comments

Comments
 (0)