Conform more of the codebase to strictNullChecks (#10666)

* Conform more of the codebase to `strictNullChecks`

* Iterate

* Iterate

* Iterate

* Iterate
This commit is contained in:
Michael Telatynski
2023-04-20 09:49:10 +01:00
committed by GitHub
parent 8867f1801e
commit 93b4ee654b
17 changed files with 126 additions and 114 deletions
+3 -4
View File
@@ -16,6 +16,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { Optional } from "matrix-events-sdk";
import { _t } from "./languageHandler";
function getDaysArray(): string[] {
@@ -194,10 +196,7 @@ function withinCurrentYear(prevDate: Date, nextDate: Date): boolean {
return prevDate.getFullYear() === nextDate.getFullYear();
}
export function wantsDateSeparator(
prevEventDate: Date | null | undefined,
nextEventDate: Date | null | undefined,
): boolean {
export function wantsDateSeparator(prevEventDate: Optional<Date>, nextEventDate: Optional<Date>): boolean {
if (!nextEventDate || !prevEventDate) {
return false;
}