Skip to content

0.5.4

Compare
Choose a tag to compare
@maciejhirsz maciejhirsz released this 22 Oct 07:58
· 308 commits to master since this release
  • Objects can now use number literals and reserved words as keys.
  • Classes can now have computed properties.
  • Classes can now use number literals and reserved words as method and property names.
  • Accessing an object member with the . operator now allows for reserved words to be used as identifiers.

In short, all of these are now acceptable syntax:

let object = { 100: 'foo', function: 'bar' };

class Foo {
    ['foo']() { }
    100() { }
    undefined() { }
}

console.log(object.function); // bar