Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Consider setting Typescript compile target to ES6 #427

Closed
doktordirk opened this issue May 4, 2016 · 8 comments
Closed

Consider setting Typescript compile target to ES6 #427

doktordirk opened this issue May 4, 2016 · 8 comments

Comments

@doktordirk
Copy link
Contributor

Given the non-compliance of Typescript to es5 compilation (particularly class inheritance), it might be better to set the compile target of Typescript to ES6 as more features are already standard in ES6. Babel could then be used to further transpile down to ES5.

@atsu85
Copy link
Contributor

atsu85 commented May 4, 2016

I'm wondering what kind of problems You have had with class inheritance? I've used superclass for views and custom elements and haven't had any problems with typescript + ES5 so far. Maybe my usecase has been different.

@doktordirk
Copy link
Contributor Author

doktordirk commented May 4, 2016

Object.hasOwnProperty and Object.getPrototypeOf don't work in the es5 version. aurelia uses both.

only comes into place when working on metadata of chiild classes

@mattgaspar
Copy link

Are you getting TypeScript errors and/or errors in the browser?
I found that the es6-collections typescript definition file doesn't cover everything in the aurelia-polyfill. Try replacing it with es6-shims definition file:
typings install es6-shim --ambient --save

@doktordirk
Copy link
Contributor Author

's not about typings. it's how they (purposefully) implemented class inheritance for es5

@mattgaspar
Copy link

I think there was some issues addressed in the aurelia-polyfills module. I remember running into some issues with IE11 a few weeks ago but they were fixed in the latest version of the polyfill
https://github.com/aurelia/polyfills/blob/master/src/object.js

@doktordirk
Copy link
Contributor Author

hm yeah, see, fixing aurelia-polyfills is exactly what i want to avoid with this suggestion here (see aurelia/polyfills#24)

@mattgaspar
Copy link

Looks like this webpack2 branch addresses the issue
#371

@EisenbergEffect
Copy link
Contributor

I think we want to keep the configuration as is for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants