From 927c7ff29875dd19a2ad7aef0e450d5488c7f1a8 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Sat, 4 Feb 2023 20:39:43 +0800 Subject: [PATCH] created global types --- types/global.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 types/global.d.ts diff --git a/types/global.d.ts b/types/global.d.ts new file mode 100644 index 0000000..3d75b17 --- /dev/null +++ b/types/global.d.ts @@ -0,0 +1,20 @@ +import { PostgrestError } from '@supabase/postgrest-js'; + +export {}; + +declare global { + interface Note { + title: string; + description: string; + } + + interface ApiResponse { + status: number; + message: string; + error: PostgrestError | null; + } + + interface DeleteResponse extends ApiResponse { + data: undefined[] | null; + } +}