6.11.0 (2016-09-22)
Spec Compliancy
- Disallow duplicate named exports (#107) @kaicataldo
// Only one default export allowed per module. (2:9)
export default function() {};
export { foo as default };
// Only one default export allowed per module. (2:0)
export default {};
export default function() {};
// `Foo` has already been exported. Exported identifiers must be unique. (2:0)
export { Foo };
export class Foo {};
New Feature (Syntax)
// AST
interface ClassProperty <: Node {
type: "ClassProperty";
key: Identifier;
value: Expression;
computed: boolean; // added
}
// with "plugins": ["classProperties"]
class Foo {
[x]
['y']
}
class Bar {
[p]
[m] () {}
}
Bug Fix
- Fix
static
property falling through in the declare class Flow AST (#135) @danharper
declare class X {
a: number;
static b: number; // static
c: number; // this was being marked as static in the AST as well
}
Polish
// Used to error with:
// SyntaxError: Assigning to rvalue (1:0)
// Now:
// Invalid left-hand side in assignment expression (1:0)
3 = 4
// Invalid left-hand side in for-in statement (1:5)
for (+i in {});