You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some specific cases, the LWC compiler throws when applying an api decorators to getter/setters.
import{LightningElement,api}from'lwc';exportdefaultclassTestextendsLightningElement{
@apigettwo(){}settwo(value){}getthree(){}
@apisetthree(value){}// ^ LWC1112: @api get three and @api set three detected in class declaration. Only one of the two needs to be decorated with @api.}
This bug appears to be related to the application order to the api decorator. In the above code snippet, moving the api decorator right before the getter definition make the compiler pass.
Version
LWC: 0.37.0
The text was updated successfully, but these errors were encountered:
Description
In some specific cases, the LWC compiler throws when applying an
api
decorators to getter/setters.This bug appears to be related to the application order to the
api
decorator. In the above code snippet, moving theapi
decorator right before the getter definition make the compiler pass.Version
The text was updated successfully, but these errors were encountered: