frankwallis / plugin-typescript

TypeScript loader for SystemJS
MIT License
248 stars 47 forks source link

Unexpected export encountered on abstract classes #197

Closed josh-sachs closed 7 years ago

josh-sachs commented 7 years ago
export abstract class foo {
    public abstract bar(): string;
}

Seems to make things choke with "unexpected token export." I'm still investigating... but there is some issue.

josh-sachs commented 7 years ago

Appears to also be an issue with:

export type Foo = {
      bar: string
}
aluanhaddad commented 7 years ago

This stems from using "module": "es2015", which works perfectly when using the builder for rollup-optimizations, not sure what the status of that feature is but it used to work in the browser as well. Doesn't have anything to do with abstract class or type declaration.

josh-sachs commented 7 years ago

Can close.

{
  target: es5,
  module: 2015
}

had been working, and stopped (for me). I actually managed to get to the bottom of another issue where the plugin wasn't properly loading (systemjs was just loading Typescript without the plugin) and that allowed me to properly flow things from typescript => babel => js which appears to resolve.