Enhanced object literals ES6 support
See original GitHub issueType of Issue
[ ] Bug Report
[ ] Feature Request
[X] Not sure
Description
There is an error during ng-packagr
running script:
Dropping unreachable code [0:371,8]
Declarations in unreachable code! [0:371,8]
I found out, method which returns object with enhanced object literals cuase an error above:
private _exampleMethod(): any {
return {
[`${TestComponent.prefix}disabled`]: this.disabled,
[`${TestComponent.prefix}${this.type}`]: this.type,
};
}
Expected Behaviour
No error
Dropping unreachable code [0:371,8]
Declarations in unreachable code! [0:371,8]
Version Information
ng-packagr: 2.4.2
@angular/compiler: 5.2.10
@angular/compiler-cli: 5.2.10
rollup: 0.55.5
tsickle: 0.27.5
typescript: 2.5.3
rxjs: 5.5.10
node: 8.11.1
npm 6.1.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ES6 in Action: Enhanced Object Literals - SitePoint
The ability to create JavaScript objects using literal notation is powerful. New features introduced from ES2015 (ES6) make object handling ...
Read more >Enhanced Object Properties | Advanced JavaScript
In summary, ES6 added three ways to simplify the declaration of object literals, that is, property notation, function notation, and computed properties. To ......
Read more >JavaScript(ES6) | Object Literal Enhancement - GeeksforGeeks
Object literal enhancement is used to group variables from the global scope and form them into javascript objects.
Read more >Enhanced Object Literals - Rediscovering JavaScript
The object literals syntax makes it possible to assign values to fields and create functions within an object. It is the colon notation...
Read more >Enhanced Object Literal Value Shorthand: JavaScript ES6 ...
Starting with ECMAScript 2015, the object initializer syntax supports computed property names. This feature allows you to put an expression in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not really, I guess what’s best is to open an issue with them. And explain the problem. By grabbing the outputted unminified UMD bundle and try to uglify it.
If you need any further help to report the problem. Let me know.
I’d appreciate if you tag me when you open it 😃
On Wed, 13 Jun 2018 at 14:13, beatadelura notifications@github.com wrote:
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.