Skip to content

Commit aebdc82

Browse files
authored
Adds comment to ignore lints for change in TS 5.8 (#6986)
This replicates an LSC from [cl/744890759](http://cl/744890759), so we would not override those changes when syncing our repo into the internal code base. (The internal change included some formatting changes, but we use a different formatter in this public repo, so I only replicated the important changes.)
1 parent 6f60e56 commit aebdc82

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tensorboard/plugins/graph/tf_graph_info/tf-node-info.ts

+8
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,10 @@ class TfNodeInfo extends LegacyElementMixin(PolymerElement) {
567567
@computed('_node')
568568
get _device(): string {
569569
var node = this._node;
570+
// TODO: go/ts58upgrade - Fix type mismatch caused by improved checking of
571+
// returned conditional operators after upgrade
572+
// TS2322: Type 'null' is not assignable to type 'string'.
573+
// @ts-ignore
570574
return node ? node.device : null;
571575
}
572576
@computed('_node', 'graphHierarchy')
@@ -675,6 +679,10 @@ class TfNodeInfo extends LegacyElementMixin(PolymerElement) {
675679
@computed('_node')
676680
get _subnodes(): unknown[] {
677681
var node = this._node;
682+
// TODO: go/ts58upgrade - Fix type mismatch caused by improved checking of
683+
// returned conditional operators after upgrade
684+
// TS2322: Type 'null' is not assignable to type 'unknown[]'.
685+
// @ts-ignore
678686
return node && node.metagraph ? node.metagraph.nodes() : null;
679687
}
680688
@computed('_predecessors')

tensorboard/plugins/hparams/tf_hparams_parallel_coords_plot/axes.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,11 @@ export class AxesCollection {
509509
public getAxisPosition(colIndex: number): number {
510510
return this._draggedAxis !== null &&
511511
this._draggedAxis.colIndex() === colIndex
512-
? this._draggedAxisPosition
512+
? // TODO: go/ts58upgrade - Fix type mismatch caused by improved checking
513+
// of returned conditional operators after upgrade
514+
// TS2322: Type 'number | null' is not assignable to type 'number'.
515+
// @ts-ignore
516+
this._draggedAxisPosition
513517
: this._stationaryAxesPositions(colIndex);
514518
}
515519
/**

0 commit comments

Comments
 (0)