facebook-nodejs-business-sdk
facebook-nodejs-business-sdk copied to clipboard
Getting a problematic warning when using the latest @types version
Which SDK version are you using?
20.0.0 (18.0.4 for @types/facebook-nodejs-business-sdk
)
What's the issue?
Getting this issue when running tsc on my project:
/@[email protected]/node_modules/@types/facebook-nodejs-business-sdk/src/objects/businessdataapi/event-request.d.ts (37,9): The return type of a 'get' accessor must be assignable to its 'set' accessor type Type 'undefined' is not assignable to type 'string'.
The issue stems from these lines of code:
/**
* Gets the partner_agent for the request
* Allows you to specify the platform from which the event is sent e.g. Zapier
*/
get partner_agent(): string | null | undefined;
/**
* Sets the partner_agent for the request
* Allows you to specify the platform from which the event is sent e.g. Zapier
* @param {String} partner_agent String value for the partner agent
*/
set partner_agent(partner_agent: string);
As you can see, the types don't match, as opposed to the previous @types
version (15.0.2
):
get partner_agent(): string | null | undefined;
set partner_agent(partner_agent: string | null | undefined);
Where they do match.