mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Fix mangopay2-nodejs-sdk types
This commit is contained in:
6
types/mangopay2-nodejs-sdk/index.d.ts
vendored
6
types/mangopay2-nodejs-sdk/index.d.ts
vendored
@@ -266,7 +266,7 @@ declare namespace MangoPay {
|
||||
|
||||
// Determines the shape of the response
|
||||
interface ReadResponseHeaders {
|
||||
readResponseHeaders: true;
|
||||
resolveWithFullResponse: true;
|
||||
}
|
||||
|
||||
interface PaginationOptions {
|
||||
@@ -306,11 +306,11 @@ declare namespace MangoPay {
|
||||
}
|
||||
|
||||
interface MethodOptionWithResponse extends MethodOptions {
|
||||
readResponseHeaders: true;
|
||||
resolveWithFullResponse: true;
|
||||
}
|
||||
|
||||
interface MethodOptionWithoutResponse extends MethodOptions {
|
||||
readResponseHeaders?: false;
|
||||
resolveWithFullResponse?: false;
|
||||
}
|
||||
|
||||
interface DependsObject {
|
||||
|
||||
@@ -54,7 +54,7 @@ api.Users.create(legalUser).then(data => {
|
||||
console.log(`${legalUser.Name} user created at ${legalUser.CreationDate}`);
|
||||
});
|
||||
|
||||
api.Users.create(legalUser, { readResponseHeaders: true }).then(data => {
|
||||
api.Users.create(legalUser, { resolveWithFullResponse: true }).then(data => {
|
||||
const d = data; // $ExpectType WithResponse<UserLegalData>
|
||||
const value = data.body; // $ExpectType UserLegalData
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user