tsconfig: Enable noUncheckedIndexedAccess.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-05-23 15:02:38 -07:00
parent 4e91572c96
commit 804c3706ff
61 changed files with 210 additions and 205 deletions

View File

@@ -82,7 +82,7 @@ export function toggle(opts: {
meta.idx = idx;
if (opts.callback) {
opts.callback(opts.values[idx].label, opts.values[idx].key);
opts.callback(opts.values[idx]!.label, opts.values[idx]!.key);
}
if (!opts.child_wants_focus) {
@@ -162,7 +162,7 @@ export function toggle(opts: {
value() {
if (meta.idx >= 0) {
return opts.values[meta.idx].label;
return opts.values[meta.idx]!.label;
}
/* istanbul ignore next */
return undefined;