Skip to content

Commit

Permalink
Improve some basic type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
henrist committed Jan 23, 2024
1 parent fc8f6c9 commit ee61ef2
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 2 deletions.
31 changes: 31 additions & 0 deletions tripletexweb/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tripletexweb/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"type": "module",
"devDependencies": {
"@types/node": "20.11.5",
"@types/prop-types": "15.7.11",
"@types/react": "18.2.48",
"@vitejs/plugin-react": "4.2.1",
"prop-types": "15.8.1",
"react-refresh": "0.14.0",
Expand Down
3 changes: 3 additions & 0 deletions tripletexweb/frontend/src/components/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export default class Account extends React.Component {
accounts: PropTypes.object.isRequired,
}

/** @type any */
context = undefined

render() {
let accountText
if (this.context.accounts[this.props.kontoSet[0].Kontonummer] === undefined) {
Expand Down
3 changes: 3 additions & 0 deletions tripletexweb/frontend/src/components/Project.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export default class Project extends React.Component {
accounts: PropTypes.object.isRequired,
}

/** @var any */
context = undefined

static propTypes = {
datasets: PropTypes.array.isRequired,
department: PropTypes.object,
Expand Down
2 changes: 2 additions & 0 deletions tripletexweb/frontend/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See vite.config.ts.
declare const BACKEND_URL_RAW: string
7 changes: 5 additions & 2 deletions tripletexweb/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"allowJs": true,
"noEmit": true
}
"checkJs": true,
"noEmit": true,
"jsx": "react"
},
"include": ["src", "vite.config.ts"]
}

0 comments on commit ee61ef2

Please sign in to comment.