On May 15, 2010, at 2:49 PM, Erik Arvidsson wrote:

On Sat, May 15, 2010 at 09:13, P T Withington <[email protected]> wrote:
Ah, destructing `.`, I missed that. Perhaps I would have gotten it with a closer parallel like

 let { draw: d } = import M;

I don't like this since it makes it look like (import M) is an
expression that returns an object that is later destructured.

Agreed.


 import { draw: d } from M;

import {drawShape: draw} from Geometry;
import {drawGun: draw} from Cowboy;
import * from Math;

I like it.

The exported name is draw, the rename target is drawShape, so you want

import {draw: drawShape} from Geometry.

Compare destructuring:

let {draw: drawGun} = cowboy;
drawGun();

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to