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

fix: v2 non-field api support #5178

Merged
merged 5 commits into from
Jan 30, 2025
Merged

Conversation

jhefferman-sfdc
Copy link
Contributor

Details

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

W-17701540

@jhefferman-sfdc jhefferman-sfdc requested a review from a team as a code owner January 30, 2025 18:14
@@ -0,0 +1,14 @@
<x-parent>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this test for symmetry (I know it is covered elsewhere too)

@@ -78,7 +78,7 @@ export class LightningElement implements PropsAvailableAtConstruction {
[SYMBOL__SET_INTERNALS](
props: Properties,
attrs: Attributes,
publicFields: Set<string>,
api: Set<string>,
Copy link
Contributor

Choose a reason for hiding this comment

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

I like publicFields better. Makes the high-level intent more obvious.

import { LightningElement, api } from 'lwc';

export default class Child extends LightningElement {
@api set setterGetterApi(value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@api set setterGetterApi(value) {
@api set setter(value) {

Can we also add a @api get getter in this test, to make sure we cover both?

@jhefferman-sfdc jhefferman-sfdc merged commit b6c0276 into master Jan 30, 2025
11 checks passed
@jhefferman-sfdc jhefferman-sfdc deleted the jhefferman/api-setter-fix branch January 30, 2025 21:04
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.

2 participants