Skip to content

Commit

Permalink
update(naming): change the naming of a generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
dependentmadani committed Jul 8, 2024
1 parent 1a12e9a commit dc750a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface ActionConfig {
/**
* UploadResponseFormat interface representing the response format expected from the backend on file uploading.
*/
export interface UploadResponseFormat<AdditionalData = {}> {
export interface UploadResponseFormat<AdditionalFileData = {}> {
/**
* success - 1 for successful uploading, 0 for failure
*/
Expand All @@ -54,13 +54,13 @@ export interface UploadResponseFormat<AdditionalData = {}> {
* The URL of the uploaded image.
*/
url: string;
} & AdditionalData;
} & AdditionalFileData;
}

/**
* ImageToolData type representing the input and output data format for the image tool, including optional custome actions.
*/
export type ImageToolData<Actions = {}, AdditionalData = {}> = {
export type ImageToolData<Actions = {}, AdditionalFileData = {}> = {
/**
* Caption for the image.
*/
Expand Down Expand Up @@ -90,7 +90,7 @@ export type ImageToolData<Actions = {}, AdditionalData = {}> = {
* The URL of the image.
*/
url: string;
} & AdditionalData;
} & AdditionalFileData;
} & (Actions extends Record<string, boolean> ? Actions : {});

/**
Expand Down

0 comments on commit dc750a5

Please sign in to comment.