diff --git a/types.d.ts b/types.d.ts index 76bd21f..723ed75 100644 --- a/types.d.ts +++ b/types.d.ts @@ -12,9 +12,19 @@ interface GCIResult { url: string; } -interface APIResult { - error?: boolean; - payload: string; +interface APIError { + error: true; + errorMessage: string; } -export { GCIAPIResult, APIResult }; +interface APISuccess { + error: false; + payload: T; +} + +interface APIQueryParams { + query: string; + lucky?: string; +} + +type APIResult = APIError | APISuccess;