Questions tagged [es6]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

LWC merge objects

I want to merge objects dynamically. I have tried it but I didn't get the expected result let result = [ { Month: 7, OLIQU: 10, Year: 2018, AccountName: "Account1",...
3
votes
1answer
146 views

When can I extend custom component in LWC?

As a general implementation guidelines of LWC, we should be extending standard LWC elements. Examples are: export default class MyComponent extends LightningElement (Most used) export default class ...
2
votes
1answer
126 views

import es6 from an extra javascript file in another component bundle in LWC

I think the documentation completely misses the case when you want to import an extra es6 module from another component bundle. Example, suppose we have the following folder structure. lwc module1 ...
9
votes
2answers
605 views

Feasibility to import entire LWC classes to access @api methods

I'm looking to modularize my LWC without having to embed them in the template. Ideally, would this kind of pattern be feasible? I'm not sure if it's my lack of ES6 knowledge (modules) or that LWC ...
0
votes
0answers
42 views

Using ES6 features in Lighting components and compatibility with IE 11

The lighting components framework development guide contains information around promises and how the framework will create a polyfill version in order to support it on all browsers. https://...
7
votes
2answers
445 views

sfdx force:lightning:lint throwing a Parsing Error with ES6 syntax

I'm running the SFDX lightning linter on a lightning component as part of a pull request for my organization, but am hitting the following error: error Parsing error: Unexpected token > Line:57:...
5
votes
1answer
664 views

Using constants in Lightning Components

What is the correct way of declaring and using constants in Lightning Components. I am seeing different behaviours depending on organisations I am in. Basic way of having pass-by-value and ...
13
votes
2answers
1k views

ECMAScript2015 compatibility

As I understand it, the platform uses closure compiler to transpile code. And closure compiler officially supports ECMAScript 6 since 2015. But lightning-cli is configured to not allow version 6 or ...
8
votes
1answer
450 views

Salesforce-lightning-cli lint & ES6 const reserved word

I am currently writing lightning components and to do so I use Ecmascript2015 standard (Object.assign, const, let, ...). Everything works perfectly but the https://www.npmjs.com/package/salesforce-...
10
votes
2answers
984 views

Use of ES6 Default Function Parameter Value Spec in Lightning Components

Whilst doing some cleanup of some Lightning Components for Summer 16, I was creating a JS function in my helper. I had wanted to add some default values to that function using the new ES6 Default ...