Skip to content

Commit b2004e5

Browse files
authored
🤖 Merge PR DefinitelyTyped#71464 fix(mailchimp__mailchimp_marketing): Fix ping.get() return type by @hkleungai
1 parent bd560a6 commit b2004e5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎types/mailchimp__mailchimp_marketing/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ export namespace ping {
11901190
* A health check for the API that won't return any account-specific information.
11911191
* @return A {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/APIHealthStatus}
11921192
*/
1193-
function get(): APIHealthStatus | ErrorResponse;
1193+
function get(): Promise<APIHealthStatus | ErrorResponse>;
11941194
}
11951195

11961196
/**

‎types/mailchimp__mailchimp_marketing/mailchimp__mailchimp_marketing-tests.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mailchimp = require("@mailchimp/mailchimp_marketing");
1+
import mailchimp from "@mailchimp/mailchimp_marketing";
22

33
// $ExpectType void;
44
mailchimp.setConfig({
@@ -146,6 +146,9 @@ const triggerCustomerJourneyBody: mailchimp.customerJourneys.TriggerCustomerJour
146146
email_address: "[email protected]",
147147
};
148148

149+
// $ExpectType Promise<APIHealthStatus | ErrorResponse>
150+
mailchimp.ping.get();
151+
149152
// $ExpectType Promise<SearchMembersSuccessResponse | ErrorResponse>
150153
mailchimp.searchMembers.search("test");
151154

0 commit comments

Comments
 (0)