Skip to content

feat: add sugar method for PropertyLValue (#1651) #1655

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

neko-para
Copy link

No description provided.

@mhdawson
Copy link
Member

@neko-para thanks for the PR, could you add a test as well?

@mhdawson mhdawson moved this from Need Triage to In Progress in Node-API Team Project May 2, 2025
@neko-para
Copy link
Author

Actually i'm not sure where should i add the tests. Maybe i shall add an extra entry?

@neko-para
Copy link
Author

@neko-para thanks for the PR, could you add a test as well?

Tests added.

@mhdawson
Copy link
Member

mhdawson commented May 6, 2025

@neko-para just to confirm its not possible to use the existing operator:

    /// Converts an L-value to a value.
    operator Value() const;

instead of adding the AsValue method ?

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.79%. Comparing base (b347dbe) to head (740d16c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1655      +/-   ##
==========================================
+ Coverage   65.76%   65.79%   +0.03%     
==========================================
  Files           3        3              
  Lines        2144     2146       +2     
  Branches      715      715              
==========================================
+ Hits         1410     1412       +2     
  Misses        162      162              
  Partials      572      572              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@neko-para
Copy link
Author

@neko-para just to confirm its not possible to use the existing operator:

    /// Converts an L-value to a value.
    operator Value() const;

instead of adding the AsValue method ?

The cast operator should always work. Adding the method is generally only for convenience, as explicit calling cast operator is not as intuitive as calling method.

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

Successfully merging this pull request may close these issues.

3 participants