Skip to content

two preserves imported interfaces (and should not) #138

@tpluscode

Description

@tpluscode

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
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions