feat: just more cleaning

This commit is contained in:
Brooklyn Nicholson 2026-04-15 14:14:01 -05:00
parent 46cef4b7fa
commit 4b4b4d47bc
24 changed files with 2852 additions and 829 deletions

View file

@ -1,11 +1,11 @@
export type RpcResult = Record<string, any>
export const asRpcResult = (value: unknown): RpcResult | null => {
export const asRpcResult = <T extends RpcResult = RpcResult>(value: unknown): T | null => {
if (!value || typeof value !== 'object' || Array.isArray(value)) {
return null
}
return value as RpcResult
return value as T
}
export const rpcErrorMessage = (err: unknown) => {