Skip to content

Instantly share code, notes, and snippets.

alert(1)
@superamadeus
superamadeus / named-imports-proposal.js
Created September 7, 2018 18:45
Namespaced imports proposal for TC39
// Premise: I have names which conflict with names I want to use in another module (rxjs).
// currently possible (annoying to rename everything)
import { race as observableRace, timer as observableTimer, fromEvent as observableFromEvent } from "rxjs";
// currently possible (prevents tree shaking when you only need a few operators.)
import * as RxJsOps from "rxjs";
// currently possible (ugly)
import { race, timer, fromEvent } from "rxjs";