Skip to content

Commit 841d604

Browse files
committed
fix typings
1 parent a4ca540 commit 841d604

File tree

13 files changed

+43
-33
lines changed

13 files changed

+43
-33
lines changed

lib/modules/tutorial/reducer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ function tutorial(t, action) {
2727
}
2828
return t;
2929
case types_1.TUTORIAL_BUILD:
30-
var dir = action.payload.dir;
31-
coderoad_cli_1.build(dir, path_1.join('tutorial', 'tutorial.md'));
30+
coderoad_cli_1.build(action.payload.dir, path_1.join('tutorial', 'tutorial.md'));
3231
return t;
3332
case types_1.TUTORIAL_LOAD:
34-
var dir = action.payload.dir;
35-
var data = JSON.parse(fs_1.readFileSync(path_1.join(dir, 'coderoad.json'), 'utf8'));
33+
var data = JSON.parse(fs_1.readFileSync(path_1.join(action.payload.dir, 'coderoad.json'), 'utf8'));
3634
return data;
3735
default:
3836
return t;

src/components/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import Routes from './Routes';
55
import Drawer from 'material-ui/Drawer';
66
import Menu from 'material-ui/svg-icons/navigation/menu';
77

8-
@connect((store: CR.State) => {
8+
@connect((store: Builder.State) => {
99
return { store };
1010
})
11-
export default class App extends React.Component<{store?: CR.State}, {}> {
11+
export default class App extends React.Component<{store?: Builder.State}, {}> {
1212
render(): React.ReactElement<{}> {
1313
const store = this.props.store;
1414
return (

src/components/Routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {Page, Start, TutorialConfig, TutorialInfo} from '../index';
33
import Top from '../TopPanel/Top';
44

55
export default class Routes extends React.Component<{
6-
route: string, checks: BuilderChecks, pagePosition: CR.PagePosition,
6+
route: string, checks: Builder.Checks, pagePosition: CR.PagePosition,
77
tutorial: CR.Tutorial, packageJson: PackageJson
88
}, {}> {
99
render() {

src/components/Start/Checks/InstallGuide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
const InstallGuide: React.StatelessComponent<{
4-
checks: BuilderChecks
4+
checks: Builder.Checks
55
}> = ({checks}) => {
66
if (!checks || !checks.passed) {
77
return null;

src/components/Start/Checks/SetupChecks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import DynamicStepper from './DynamicStepper';
88
import StepCheck from './StepCheck';
99

1010
const SetupChecks: React.StatelessComponent<{
11-
checks: BuilderChecks
11+
checks: Builder.Checks
1212
}> = ({checks}) => {
1313
const {setup} = checks;
1414
if (setup.passed) {

src/components/Start/Checks/SystemChecks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import DynamicStepper from './DynamicStepper';
99
import StepCheck from './StepCheck';
1010

1111
const SystemChecks: React.StatelessComponent<{
12-
checks: BuilderChecks
12+
checks: Builder.Checks
1313
}> = ({checks}) => {
1414
const {system} = checks;
1515
if (system.passed) {

src/components/Start/Checks/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const styles = {
1010
};
1111

1212
const Checks: React.StatelessComponent<{
13-
checks: BuilderChecks
13+
checks: Builder.Checks
1414
}> = ({checks}) => {
1515
if (!checks) {
1616
return <ContentCard

src/components/Start/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const headerStyles = {
1010
};
1111

1212
export const Start: React.StatelessComponent<{
13-
checks: BuilderChecks
13+
checks: Builder.Checks
1414
}> = ({checks}) => (
1515
<section className='cr-start'>
1616
<div style={headerStyles}>

src/components/TutorialConfig/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const styles = {
2121
},
2222
};
2323

24-
2524
@connect(null, dispatch => {
2625
return {
2726
save: (pj: Tutorial.PJ) => dispatch(pjSave(pj)),
@@ -34,7 +33,7 @@ const styles = {
3433
export default class TutorialConfig extends React.Component <{
3534
packageJson: any,
3635
save?: (pj: Tutorial.PJ) => any,
37-
routeToInfo?: () => any
36+
routeToPage?: () => any
3837
}, {
3938
pj: Tutorial.PJ
4039
}> {

src/modules/setup/reducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {SETUP_VERIFY} from './types';
22
import setupVerify from './utils/verify';
33

4-
const _checks: BuilderChecks = {
4+
const _checks: Builder.Checks = {
55
passed: false,
66
system: {
77
node: false,
@@ -15,7 +15,7 @@ const _checks: BuilderChecks = {
1515

1616
export default function checks(
1717
checks = _checks, action: Action
18-
): BuilderChecks {
18+
): Builder.Checks {
1919
switch (action.type) {
2020

2121
case SETUP_VERIFY:

0 commit comments

Comments
 (0)