fix: 🚨 Replace ts-ignore with ts-expect-error

This commit is contained in:
Jesse Wierzbinski 2024-10-03 10:26:58 +02:00
parent f523e5d355
commit 06315e8a81
No known key found for this signature in database

View file

@ -82,15 +82,15 @@ export const userExtras = {
};
export const userExtrasTemplate = (name: string) => ({
// @ts-ignore
// @ts-expect-error sql is a template tag, so it gets confused when we use it as a function
followerCount: sql([
`(SELECT COUNT(*) FROM "Relationships" "relationships" WHERE ("relationships"."ownerId" = "${name}".id AND "relationships"."following" = true))`,
]).as("follower_count"),
// @ts-ignore
// @ts-expect-error sql is a template tag, so it gets confused when we use it as a function
followingCount: sql([
`(SELECT COUNT(*) FROM "Relationships" "relationshipSubjects" WHERE ("relationshipSubjects"."subjectId" = "${name}".id AND "relationshipSubjects"."following" = true))`,
]).as("following_count"),
// @ts-ignore
// @ts-expect-error sql is a template tag, so it gets confused when we use it as a function
statusCount: sql([
`(SELECT COUNT(*) FROM "Notes" WHERE "Notes"."authorId" = "${name}".id)`,
]).as("status_count"),