Skip to content

Conversation

@dajimenezriv-internxt
Copy link
Contributor

No description provided.

@dajimenezriv-internxt dajimenezriv-internxt self-assigned this Sep 23, 2025
T napi_extract_value(napi_env env, napi_value value);

template<>
inline std::wstring napi_extract_value<std::wstring>(napi_env env, napi_value value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the function we use to extract a string argument.

}

template<>
inline int64_t napi_extract_value<int64_t>(napi_env env, napi_value value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the function we use to extract a int64 argument

template<size_t N>
std::array<std::wstring, N> napi_extract_args(napi_env env, napi_callback_info info) {
template<>
inline bool napi_extract_value<bool>(napi_env env, napi_value value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the function we use to extract a boolean argument

return result;
}

template<typename... Types, std::size_t... Is>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two functions are parsed in compilation to extract all arguments based on the types we pass

@sg-gs
Copy link
Member

sg-gs commented Sep 23, 2025

Hey @dajimenezriv-internxt, no reviewers are assigned to this PR. That will not trigger any notification and therefore, no one will be noticed about the need to review

egalvis27
egalvis27 previously approved these changes Sep 23, 2025
@dajimenezriv-internxt dajimenezriv-internxt merged commit f7bcbac into master Sep 23, 2025
2 checks passed
@dajimenezriv-internxt dajimenezriv-internxt deleted the improve-extract-args branch September 23, 2025 15:37
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Successfully merging this pull request may close these issues.

3 participants