Skip to content

Commit

Permalink
Change to match goban @type versions
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAsJade committed Oct 1, 2023
1 parent 4578ab4 commit ddce63b
Show file tree
Hide file tree
Showing 4 changed files with 2,678 additions and 2,417 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
"tslint": "^6.1.3",
"typescript": "^5.0.4",
"_comment-about-typescript": "vvv current version of eslint-plugin requires this",
"typescript": "<5.2.0",
"webpack": "^5.78.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
Expand All @@ -96,9 +97,9 @@
"@types/moment-duration-format": "^2.2.2",
"@types/platform": "^1.3.4",
"@types/query-string": "^5.0.1",
"@types/react": "^18.0.20",
"@types/react": "^18.0.28",
"@types/react-autosuggest": "^10.1.5",
"@types/react-dom": "^18.0.6",
"@types/react-dom": "^18.0.11",
"@types/react-virtualized": "^9.21.21",
"@types/sanitize-html": "^1.22.0",
"array-move": "^2.2.1",
Expand Down
6 changes: 3 additions & 3 deletions src/views/LearningHub/LearningHubSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/

import * as React from "react";
import { LearningPage, DummyPage } from "./LearningPage";
import { LearningPage, DummyPage, LearningPageProperties } from "./LearningPage";
import { getFirstUncompletedPage } from "./util";

interface LearningHubSectionProperties {
page: number;
title: string;
nextSection: string;
section: string;
pages: Array<typeof LearningPage>;
pages: React.ComponentType<LearningPageProperties>[];
}

export abstract class LearningHubSection extends React.PureComponent<LearningHubSectionProperties> {
Expand All @@ -49,7 +49,7 @@ export abstract class LearningHubSection extends React.PureComponent<LearningHub
let page = this.props.page || getFirstUncompletedPage(this.props.section);
page = Math.min(page, this.props.pages.length);
page = Math.max(page, 0);
const P: typeof LearningPage = this.props.pages[page];
const P = this.props.pages[page];
return (
<P
title={this.props.title}
Expand Down
2 changes: 1 addition & 1 deletion src/views/LearningHub/LearningPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { browserHistory } from "ogsHistory";
import { setSectionPageCompleted, getSectionPageCompleted } from "./util";
import { _ } from "translate";

interface LearningPageProperties {
export interface LearningPageProperties {
title: string;
npages: number;
curpage: number;
Expand Down
Loading

0 comments on commit ddce63b

Please sign in to comment.