All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
791 B
TypeScript
24 lines
791 B
TypeScript
import type { SQLOutputValue } from "node:sqlite";
|
|
|
|
export interface FollowRow {
|
|
id: string;
|
|
follower_id: string;
|
|
followed_user_id: string | null;
|
|
followed_playlist_id: string | null;
|
|
created_at: string;
|
|
[key: string]: SQLOutputValue;
|
|
}
|
|
|
|
export function isFollowRow(
|
|
obj: unknown,
|
|
): obj is FollowRow {
|
|
return !!obj && typeof obj === "object" &&
|
|
"id" in obj && typeof obj.id === "string" &&
|
|
"follower_id" in obj && typeof obj.follower_id === "string" &&
|
|
"created_at" in obj && typeof obj.created_at === "string" &&
|
|
"followed_user_id" in obj && (obj.followed_user_id === null ||
|
|
typeof obj.followed_user_id === "string") &&
|
|
"followed_playlist_id" in obj && (obj.followed_playlist_id === null ||
|
|
typeof obj.followed_playlist_id === "string");
|
|
}
|