Skip to content

Commit 85d31d9

Browse files
ashleybisramPeter2oussaint
authored andcommitted
add interface for props, state, and pass along types for component.
1 parent 59255cb commit 85d31d9

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

examples/AWS/AWS-EC2/client/App.jsx renamed to examples/AWS/AWS-EC2/client/App.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@
1212
import React, { Component } from 'react';
1313
import MainContainer from './containers/MainContainer.jsx';
1414

15-
class App extends Component {
16-
// constructor(props) {
17-
// super(props);
18-
// }
15+
interface AppProps {
16+
//! Define your props type here, if any
17+
}
18+
19+
interface AppState {
20+
//! Define your state type here, if any
21+
}
22+
23+
class App extends Component<AppProps, AppState> {
24+
// constructor(props: AppProps) {
25+
// super(props);
26+
//! Initialize state here if needed
27+
// }
1928

2029
render() {
2130
return(

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
"node_modules",
2626
"dist"
2727
],
28-
"include": ["./electron/**/*", "./electron/**/*.json", "__tests__/jest.config.ts", "./settings.json", "./chronos_npm_package/**/*.ts"]
28+
"include": ["./electron/**/*", "./electron/**/*.json", "__tests__/jest.config.ts", "./settings.json", "./chronos_npm_package/**/*.ts", "./examples/**/**/**/*"]
2929
}

0 commit comments

Comments
 (0)