Isomorphic JavaScript client for Supabase providing authentication, database, real-time, storage, and edge functions capabilities.
89
{
"context": "This criteria evaluates how effectively the engineer uses @supabase/supabase-js TypeScript type generation features to create type-safe database operations. It focuses on proper usage of generic types, database schema type definitions, and type inference for queries.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Database type interface",
"description": "Defines a comprehensive Database interface with the correct structure including public schema, Tables, and the tasks table with Row, Insert, and Update types as specified in the API",
"max_score": 20
},
{
"name": "Typed client creation",
"description": "Uses createClient with the Database generic type parameter (SupabaseClient<Database>) to create a type-safe Supabase client in the createTaskClient function",
"max_score": 15
},
{
"name": "Type-safe select queries",
"description": "Uses .from('tasks').select() with proper type inference in fetchAllTasks, ensuring the return type matches Database['public']['Tables']['tasks']['Row'][]",
"max_score": 20
},
{
"name": "Type-safe insert operations",
"description": "Uses .from('tasks').insert() with the Insert type for input validation in insertTask, accepting Database['public']['Tables']['tasks']['Insert'] as the parameter type",
"max_score": 15
},
{
"name": "Type-safe update operations",
"description": "Uses .from('tasks').update().eq() with the Update type in updateTask, accepting Database['public']['Tables']['tasks']['Update'] as the updates parameter type",
"max_score": 15
},
{
"name": "Custom return types",
"description": "Uses .select() with specific column selection (e.g., 'id, title') in fetchTaskSummaries and returns a correctly typed result that reflects only the selected columns",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-supabase--supabase-jsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10