Skip to content

Commit

Permalink
Merge pull request online-go#2381 from GreenAsJade/goban_compatible_t…
Browse files Browse the repository at this point in the history
…ypes

Change to match goban @type versions
  • Loading branch information
anoek authored Oct 1, 2023
2 parents 4b59ba1 + 6eb10cb commit 365c44c
Show file tree
Hide file tree
Showing 4 changed files with 2,677 additions and 2,417 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
"tslint": "^6.1.3",
"typescript": "^5.0.4",
"typescript": "<5.2.0",
"webpack": "^5.78.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
Expand All @@ -96,9 +96,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 365c44c

Please sign in to comment.