Skip to content

Commit 88b8fae

Browse files
authored
Fix compilation issues with TypeScript 5.1. (#6502)
Add @ts-ignore annotations for TS 5.1 errors Details about TypeScript 5.1 can be found in https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/ @ts-ignore suppresses the new TS compiler errors without making any change to the code's runtime behavior. Googlers, see cl/548812150 for context.
1 parent 854f969 commit 88b8fae

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tensorboard/plugins/graph/tf_graph_controls/tf-graph-controls.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,19 +1340,31 @@ class TfGraphControls extends LegacyElementMixin(
13401340
let minValue = params.minValue;
13411341
let maxValue = params.maxValue;
13421342
if (colorBy === ColorBy.MEMORY) {
1343+
// TODO: go/ts51upgrade - Auto-added to unblock TS5.1 migration.
1344+
// TS2322: Type 'string' is not assignable to type 'number'.
1345+
// @ts-ignore
13431346
minValue = tf_graph_util.convertUnitsToHumanReadable(
13441347
minValue,
13451348
tf_graph_util.MEMORY_UNITS
13461349
);
1350+
// TODO: go/ts51upgrade - Auto-added to unblock TS5.1 migration.
1351+
// TS2322: Type 'string' is not assignable to type 'number'.
1352+
// @ts-ignore
13471353
maxValue = tf_graph_util.convertUnitsToHumanReadable(
13481354
maxValue,
13491355
tf_graph_util.MEMORY_UNITS
13501356
);
13511357
} else if (colorBy === ColorBy.COMPUTE_TIME) {
1358+
// TODO: go/ts51upgrade - Auto-added to unblock TS5.1 migration.
1359+
// TS2322: Type 'string' is not assignable to type 'number'.
1360+
// @ts-ignore
13521361
minValue = tf_graph_util.convertUnitsToHumanReadable(
13531362
minValue,
13541363
tf_graph_util.TIME_UNITS
13551364
);
1365+
// TODO: go/ts51upgrade - Auto-added to unblock TS5.1 migration.
1366+
// TS2322: Type 'string' is not assignable to type 'number'.
1367+
// @ts-ignore
13561368
maxValue = tf_graph_util.convertUnitsToHumanReadable(
13571369
maxValue,
13581370
tf_graph_util.TIME_UNITS

0 commit comments

Comments
 (0)