Enable tsconfig noUncheckedIndexedAccess

This commit is contained in:
Jamie
2026-03-12 16:24:01 -07:00
committed by GitHub
parent 34b0f9cd50
commit 1d45a52da7
311 changed files with 2146 additions and 1589 deletions

View File

@@ -860,7 +860,7 @@ describe('BodyRanges', () => {
replacementText: 'Eve',
conversationID: 'x',
},
];
] as const;
const { cleanedSnippet, bodyRanges: processedBodyRanges } =
processBodyRangesForSearchResult({
snippet:

View File

@@ -271,7 +271,7 @@ describe('Contact', () => {
],
},
],
};
} as const;
const result = await upgradeVersion(
message.contact[0],
defaultContext,
@@ -301,7 +301,7 @@ describe('Contact', () => {
],
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -348,7 +348,7 @@ describe('Contact', () => {
} as unknown as Avatar,
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -411,7 +411,7 @@ describe('Contact', () => {
} as unknown as Avatar,
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -474,11 +474,11 @@ describe('Contact', () => {
{
type: 0,
value: 'someone@somewhere.com',
},
} as unknown as Email,
],
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -524,7 +524,7 @@ describe('Contact', () => {
],
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -572,7 +572,7 @@ describe('Contact', () => {
],
},
],
};
} as const;
const expected = {
name: {
nickname: 'Someone Somewhere',
@@ -605,7 +605,7 @@ describe('Contact', () => {
],
},
],
};
} as const;
const result = await upgradeVersion(
message.contact[0],
defaultContext,

View File

@@ -1036,9 +1036,9 @@ describe('NotificationProfile', () => {
const starting = [middle, old, newest];
const actual = sortProfiles(starting);
assert.strictEqual(actual[0].name, 'newest');
assert.strictEqual(actual[1].name, 'middle');
assert.strictEqual(actual[2].name, 'old');
assert.strictEqual(actual[0]?.name, 'newest');
assert.strictEqual(actual[1]?.name, 'middle');
assert.strictEqual(actual[2]?.name, 'old');
});
});