mirror of https://github.com/lukechilds/rollup.git
2 changed files with 17 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'handle destruction patterns in export declarations', |
|||
babel: true, |
|||
|
|||
exports: function ( exports ) { |
|||
assert.deepEqual( Object.keys( exports ), [ 'baz', 'quux' ] ); |
|||
assert.equal( exports.baz, 5 ); |
|||
assert.equal( exports.quux, 17 ); |
|||
} |
|||
}; |
@ -0,0 +1,5 @@ |
|||
var foo = { bar: { baz: 5 } }; |
|||
var arr = [ { quux: 'wrong' }, { quux: 17 } ]; |
|||
|
|||
export var { bar: { baz } } = foo; |
|||
export var [ /* skip */, { quux } ] = arr; |
Loading…
Reference in new issue