Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a problematic warning when using the latest @types version #290

Open
amit-toren opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@amit-toren
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant