Skip to content

Use strictNullChecks in matrix-react-sdk #21967

@novocaine

Description

@novocaine

Your use case

https://www.typescriptlang.org/tsconfig#strictNullChecks

This will reduce the number of runtime errors caused by unexpected null and undefined values by disallowing them as a value unless explicitly permitted.

Related: matrix-org/matrix-js-sdk#2112

### Tasks
- [ ] https://github.com/vector-im/element-web/issues/24659
- [x] https://github.com/vector-im/element-web/issues/24658
- [ ] https://github.com/vector-im/element-web/issues/24657
- [ ] https://github.com/vector-im/element-web/issues/24656
- [x] https://github.com/vector-im/element-web/issues/24655
- [ ] https://github.com/vector-im/element-web/issues/24654
- [x] https://github.com/vector-im/element-web/issues/24653
- [x] https://github.com/vector-im/element-web/issues/24652
- [ ] https://github.com/vector-im/element-web/issues/24651
- [ ] https://github.com/vector-im/element-web/issues/24650
- [x] https://github.com/vector-im/element-web/issues/24649
- [ ] https://github.com/vector-im/element-web/issues/24756
- [ ] https://github.com/vector-im/element-web/issues/24755
- [ ] https://github.com/vector-im/element-web/issues/24754
- [ ] https://github.com/vector-im/element-web/issues/24753
- [ ] https://github.com/vector-im/element-web/issues/24822
- [ ] https://github.com/vector-im/element-web/issues/24836
- [ ] https://github.com/vector-im/element-web/issues/24935
- [ ] https://github.com/vector-im/element-web/issues/24936
- [ ] https://github.com/vector-im/element-web/issues/24938
- [ ] https://github.com/vector-im/element-web/issues/24937
- [ ] https://github.com/vector-im/element-web/issues/24940
- [ ] https://github.com/vector-im/element-web/issues/24939
- [ ] https://github.com/vector-im/element-web/issues/24941
- [ ] https://github.com/vector-im/element-web/issues/25217
- [ ] https://github.com/vector-im/element-web/issues/24944
- [ ] https://github.com/vector-im/element-web/issues/24945
- [ ] https://github.com/vector-im/element-web/issues/24946
- [ ] https://github.com/vector-im/element-web/issues/24948
- [ ] https://github.com/vector-im/element-web/issues/25017
- [ ] https://github.com/vector-im/element-web/issues/25086
- [ ] https://github.com/vector-im/element-web/issues/24943
- [ ] https://github.com/vector-im/element-web/issues/25087
- [ ] https://github.com/vector-im/element-web/issues/25088
- [ ] https://github.com/vector-im/element-web/issues/25370
- [ ] https://github.com/vector-im/element-web/issues/24752
- [ ] https://github.com/vector-im/element-web/issues/24947
- [ ] https://github.com/vector-im/element-web/issues/24942
- [ ] https://github.com/vector-im/element-web/issues/24838
- [ ] https://github.com/vector-im/element-web/issues/25344
- [x] Apply `strictNullChecks` to `src/components/structures/InteractiveAuth.tsx`
- [x] Apply `strictNullChecks` to `src/Lifecycle.ts`
- [x] Apply `strictNullChecks` to `src/components/structures/RoomView.tsx`
- [x] Apply `strictNullChecks` to `src/components/structures/ScrollPanel.tsx`
- [x] Apply `strictNullChecks` to `src/components/structures/TimelinePanel.tsx`
- [x] Apply `strictNullChecks` to `src/IdentityAuthClient.tsx` & `src/AddThreepid.ts`
- [x] Apply `strictNullChecks` to `src/components/views/rooms/R*.tsx`
- [x] Apply `strictNullChecks` to `src/createRoom.ts`
- [x] Apply `strictNullChecks` to `src/components/views/rooms/[NPST]*.tsx`
- [x] Apply `strictNullChecks` to `src/components/views/dialogs/*`
- [x] Apply `strictNullChecks` to `src/components/structures/MatrixChat.tsx`
- [x] Apply `strictNullChecks` to `src/audio/*`
- [x] Apply `strictNullChecks` to `src/customisations/Media.ts`
- [ ] https://github.com/vector-im/element-web/issues/25345

Have you considered any alternatives?

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions