Code Snippets
TypeScript
Template Literal types:
type hue = 'red' | 'blue'
type step = '300' | '500' | '700'
type color = `text-${hue}-${step}`Supabase
For adding an automatic updated_at column (by riderx):
- Allow
moddatetimein Extensions - Add
updated_atcolumn to a table, timestamptz type, defaultnow()value - Run sql command:
create trigger handle_updated_at before update on [TABLENAME]
for each row execute procedure moddatetime (updated_at);