fix(types): resolve all TypeScript compilation errors from non-null assertion removal
Fixes: - chats.ts: revert encodeResult/initial to ! (guaranteed by callback assignment) - groups.ts: fix operator precedence with ?? (wrap +attrs in parens), fix groupId type - messages-recv.ts: extract messageKey.id to local const with fallback - socket.ts: revert onClose! (guaranteed by synchronous callback assignment) - event-buffer.ts: add 'notify' fallback for MessageUpsertType - messages.ts: add filePath const after null guard, fix contextInfo type assertion - noise-handler.ts: restore array index ! (guaranteed by length check) Build now compiles with zero new errors. https://claude.ai/code/session_01E2cfX1N3sJgCJBTvzGazSG
This commit is contained in:
+2
-2
@@ -886,8 +886,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
const { onMutation } = newAppStateChunkHandler(false)
|
||||
const { mutationMap } = await decodePatches(
|
||||
name,
|
||||
[{ ...encodeResult?.patch, version: { version: encodeResult?.state?.version } }],
|
||||
initial ?? { version: 0, hash: Buffer.alloc(0), indexValueMap: {} },
|
||||
[{ ...encodeResult!.patch, version: { version: encodeResult!.state.version } }],
|
||||
initial!,
|
||||
getAppStateSyncKey,
|
||||
config.options,
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user