-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade typescript to latest version, and fix new errors #3466
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -611,7 +611,7 @@ export function getAlterationEnrichmentColumns( | |
enrichedGroupColum.tooltip = ( | ||
<table> | ||
<tr> | ||
<td>Log ratio > 0</td> | ||
<td>Log ratio {'>'} 0</td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. officially, JSX does not allow >, <, {, } as plaintext characters, and the new version of typescript catches that |
||
<td>: Enriched in {group1.name}</td> | ||
</tr> | ||
<tr> | ||
|
@@ -728,7 +728,7 @@ export function getEnrichmentColumns( | |
enrichedGroupColum.tooltip = ( | ||
<table> | ||
<tr> | ||
<td>Log ratio > 0</td> | ||
<td>Log ratio {'>'} 0</td> | ||
<td>: Enriched in {group1.name}</td> | ||
</tr> | ||
<tr> | ||
|
@@ -877,7 +877,7 @@ export function getGenericAssayEnrichmentColumns( | |
enrichedGroupColum.tooltip = ( | ||
<table> | ||
<tr> | ||
<td>Log ratio > 0</td> | ||
<td>Log ratio {'>'} 0</td> | ||
<td>: Enriched in {group1.name}</td> | ||
</tr> | ||
<tr> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,10 @@ import { | |
GeneticTrackDatum_Data, | ||
} from '../../../../shared/components/oncoprint/Oncoprint'; | ||
import { percentAltered } from '../../../../shared/components/oncoprint/OncoprintUtils'; | ||
import { AlterationTypeConstants } from '../../../resultsView/ResultsViewPageStore'; | ||
import { | ||
AlterationTypeConstants, | ||
AnnotatedExtendedAlteration, | ||
} from '../../../resultsView/ResultsViewPageStore'; | ||
import { cna_profile_data_to_string } from '../../../../shared/lib/oql/AccessorsForOqlFilter'; | ||
import { | ||
fillGeneticTrackDatum, | ||
|
@@ -707,8 +710,10 @@ export function annotateGeneticTrackData( | |
const newObj = _.clone(object); | ||
newObj.data = newObj.data.filter(d => { | ||
// clear previous annotations | ||
delete d.oncoKbOncogenic; | ||
delete d.putativeDriver; | ||
delete (d as Partial<OncoprinterGeneticTrackDatum_Data>) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the new typescript has a check which does not allow you to use |
||
.oncoKbOncogenic; | ||
delete (d as Partial<OncoprinterGeneticTrackDatum_Data>) | ||
.putativeDriver; | ||
// annotate and filter out if necessary | ||
switch (d.molecularProfileAlterationType) { | ||
case AlterationTypeConstants.COPY_NUMBER_ALTERATION: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,10 +246,7 @@ export default class GeneSymbolValidatorMessage extends React.Component< | |
|
||
return ( | ||
<div id="geneBoxValidationStatus"> | ||
<GeneSymbolValidatorMessageChild | ||
replaceGene={this.props.replaceGene} | ||
{...this.props} | ||
/> | ||
<GeneSymbolValidatorMessageChild {...this.props} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happened to replaceGene? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's already in |
||
</div> | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ export enum OverlapStrategy { | |
EXCLUDE = 'Exclude', | ||
} | ||
|
||
export default class ComparisonStore { | ||
export default abstract class ComparisonStore { | ||
private tabHasBeenShown = observable.map<boolean>(); | ||
private tabHasBeenShownReactionDisposer: IReactionDisposer; | ||
@observable public newSessionPending = false; | ||
|
@@ -170,6 +170,13 @@ export default class ComparisonStore { | |
protected async saveAndGoToSession(newSession: Session) { | ||
throw new Error(`saveAndGoToSession must be implemented in subclass`); | ||
} | ||
abstract _session: MobxPromise<Session>; | ||
abstract _originalGroups: MobxPromise<ComparisonGroup[]>; | ||
abstract overlapStrategy: OverlapStrategy; | ||
abstract usePatientLevelEnrichments: boolean; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the new typescript catches if the superclass declares an instance property and the subclass overrides it using a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. abstract forces the subclass to define it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe so, yes. and it allows the property to be implemented using an instance property or a getter |
||
abstract samples: MobxPromise<Sample[]>; | ||
abstract studies: MobxPromise<CancerStudy[]>; | ||
// < / > | ||
|
||
public get isLoggedIn() { | ||
return this.appStore.isLoggedIn; | ||
|
@@ -194,14 +201,6 @@ export default class ComparisonStore { | |
this.saveAndGoToSession(newSession); | ||
} | ||
|
||
readonly _session: MobxPromise<Session>; // must be implemented in subclasses | ||
readonly _originalGroups: MobxPromise<ComparisonGroup[]>; // must be implemented in subclasses | ||
public overlapStrategy: OverlapStrategy; // must be implemented in subclasses | ||
public usePatientLevelEnrichments: boolean; // must be implemented in subclasses | ||
readonly samples: MobxPromise<Sample[]>; // must be implemented in subclass | ||
readonly studies: MobxPromise<CancerStudy[]>; // must be implemented in subclass | ||
// < / > | ||
|
||
readonly origin = remoteData({ | ||
// the studies that the comparison groups come from | ||
await: () => [this._session], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dippindots you worked on geneset stuff right? could you take a look at these changes I made relating to GeneticEntityType and make sure I haven't done anything weird? this is all just to fix typescript errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamabeshouse This looks good to me! It's in sync with the backend.