twc
twc copied to clipboard
two preserves imported interfaces (and should not)
I have code similar to this
import {IHydraResource} from 'alcaeus/types/Resources';
@CustomElement()
export class AugeanConsole extends Polymer.Element {
model: IHydraResource = null;
}
The interface has no meaning in JavaScript and with twc 0.4.6 it was replaced with object.
In twc 0.5.5 however the interface makes its way through to JS code and breaks at runtime (targeting Polymer 2.0).
class AugeanConsole extends Polymer.Element {
static get is() {
return "augean-console";
}
static get properties() {
return {
model: {
type: IHydraResource,
value: null
}
}
}
}