Skip to content

Commit

Permalink
Resolve ESLint issues regarding conditional types for BusinessProfile…
Browse files Browse the repository at this point in the history
… field inclusion
  • Loading branch information
domwebber committed Nov 20, 2024
1 parent 9d5d62a commit 27c00af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BusinessProfile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class BusinessProfile {
return encodeURIComponent(phoneNumberID) + "/whatsapp_business_profile";
}

public getBusinessProfile<Fields extends GetBusinessProfileFields = {}>({
public getBusinessProfile<Fields extends GetBusinessProfileFields = object>({
phoneNumberID,
fields,
request,
Expand Down
4 changes: 2 additions & 2 deletions src/types/BusinessProfile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export type GetBusinessProfileFields = {
vertical?: boolean;
};

export type GetBusinessProfileOptions<Fields extends GetBusinessProfileFields = {}> = {
export type GetBusinessProfileOptions<Fields extends GetBusinessProfileFields = object> = {
phoneNumberID: PhoneNumberID;
fields?: Fields;
}

export type GetBusinessProfilePayload<Fields extends GetBusinessProfileFields = {}> = {
export type GetBusinessProfilePayload<Fields extends GetBusinessProfileFields = object> = {
data: [{
about: Fields extends { about: true } ? string : undefined;
address: Fields extends { address: true } ? string : undefined;
Expand Down

0 comments on commit 27c00af

Please sign in to comment.