Comments (4)
@AllanOricil weirdly enough, I tried adding my code as a jest test in lwc-compiler and it passes, so it might not be directly related to the latest version of lightning-language-server. I tried looking into dependencies of VS Code plugins itself and it seems that the latest lwc-language-server
is using "@lwc/compiler": "0.34.8"
which is 3 years old, so might be related to it
from lightning-language-server.
Thanks for logging this! Since we're tracking it over in the extensions repo with #3704, I'll close this issue in favor of that one for now.
from lightning-language-server.
@pmdartus @nolanlawson I confirm @ytiq isolated the problem correctly. It is not an issue related to vscode not loading the language server.
steps:
1 - create a lwc with the following code
import { LightningElement, api } from 'lwc';
export default class Test extends LightningElement {
@api set test1(value){}
get test2(){}
}
2 - verify it does work and no language server error is present
3 - change the lwc code to this one
import { LightningElement, api } from 'lwc';
export default class Test extends LightningElement {
@api set test1(value){}
@api get test2(){}
}
4 - verify that now you have the error from this issue
5 - conclude that in a class you can't decorate a getter and a setter with @api. You must choose one of them in the whole js file to decorate with @api. In other words, either all getters are decorated with @api, or all setters.
from lightning-language-server.
salesforce/lwc#2406
salesforce/eslint-config-lwc#66
from lightning-language-server.
Related Issues (20)
- Implement markup warning messages for `lighting` / `lightening`
- Add support for Lightning Web Components Open Source
- Dependabot can't resolve your JavaScript dependency files
- Dependabot couldn't authenticate with registry.npmjs.org
- Test string util classes HOT 1
- jsconfig missing custom component mappings HOT 2
- Generated Apex and sobject typings missing HOT 2
- Message: Request textDocument/definition failed with message: Cannot destructure property 'delimiter' of '(intermediate value)(intermediate value)(intermediate value)' as it is undefined. HOT 1
- The `eslint.nodePath` value in `.vscode/settings.json` does not get updated HOT 1
- Error when using <objects><object>SOBJECT_NAME</object></objects> inside a <targetConfig> HOT 2
- Components with NavigationMixin aren't being parsed correctly to provide hover functionality HOT 2
- Viewing LWC code produces errors in `LWC Language Server` tab HOT 5
- LWC Language Server errors on load when config.blt is not present HOT 1
- LWC Autocomplete for component names in test files should use dashes
- compileSource() fails if node modules haven't been installed, and we should fail in a graceful way
- Cache usage results in unit test failures on windows.
- An error comes up when you try to use the new template directives HOT 2
- messageService.d.ts file contains incorrect default parameter values for subscribe method
- Mixed mode workspaces should be supported, or workspace detection improved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning-language-server.