Steps to replicate the issue (include links if applicable):
- Try to minify this. Run it in your console too to verify input and output.
class Robot {
/** @type {String} */
type = "Astromech Droid";
constructor() {
this.id = 1;
}
name = "R2D2"
properties = {}
}
var robot = new Robot()
console.log( robot.type )
console.log( robot.id )
console.log( robot.name )
console.log( robot.properties )What happens?:
- Minifies to
class Robot{type="Astromech Droid";constructor(){this.id=1;}name="R2D2"properties={}}var robot=new Robot()
console.log(robot.type)
console.log(robot.id)
console.log(robot.name)
console.log(robot.properties)- Console output is: "Uncaught SyntaxError: Unexpected identifier 'properties'"
What should have happened instead?:
- should have included a semicolon between name="R2D2"properties={}
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):