Conform more of the codebase to strictNullChecks
(#10602)
* Conform more of the codebase to `strictNullChecks` * Conform more of the codebase to `strictNullChecks` * Fix types
This commit is contained in:
parent
93858813a3
commit
daad630827
26 changed files with 79 additions and 49 deletions
|
@ -100,14 +100,14 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
|||
|
||||
if (this.props.room && SettingsStore.getValue("feature_state_counters")) {
|
||||
const stateEvs = this.props.room.currentState.getStateEvents("re.jki.counter");
|
||||
stateEvs.sort((a, b) => lexicographicCompare(a.getStateKey(), b.getStateKey()));
|
||||
stateEvs.sort((a, b) => lexicographicCompare(a.getStateKey()!, b.getStateKey()!));
|
||||
|
||||
for (const ev of stateEvs) {
|
||||
const title = ev.getContent().title;
|
||||
const value = ev.getContent().value;
|
||||
const link = ev.getContent().link;
|
||||
const severity = ev.getContent().severity || "normal";
|
||||
const stateKey = ev.getStateKey();
|
||||
const stateKey = ev.getStateKey()!;
|
||||
|
||||
// We want a non-empty title but can accept falsy values (e.g.
|
||||
// zero)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue