Commit dc20af5
authored
Move the initializer into the constructor for instance members that r… (tensorflow#6921)
…eference identifiers declared in the constructor.
This updates our OSS code with a change made in cl/678990911, to prevent
the change being reverted the next time we sync into our internal code
base.
When TypeScript outputs modern language features, the below case throws
an TS error.
```
class C {
a = this.x; // TS2729: Property 'x' is used before its initialization.
constructor(public x:number){}
}
```
This error is fixed by moving the initializer of such class members into
the constructor.1 parent 6439f10 commit dc20af5
File tree
11 files changed
+583
-553
lines changed- tensorboard
- plugins/debugger_v2/tf_debugger_v2_plugin/views/graph_executions
- webapp
- app_routing
- effects
- views
- core/views
- hparams/_redux
- metrics/views
- card_renderer
- main_view
- right_pane/scalar_column_editor
- notification_center/_views
- runs/views/runs_table
11 files changed
+583
-553
lines changedLines changed: 26 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 49 | + | |
62 | 50 | | |
63 | | - | |
| 51 | + | |
64 | 52 | | |
65 | 53 | | |
66 | 54 | | |
67 | 55 | | |
68 | 56 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 57 | + | |
72 | 58 | | |
73 | 59 | | |
74 | 60 | | |
| |||
78 | 64 | | |
79 | 65 | | |
80 | 66 | | |
81 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
0 commit comments