Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

include Reflect es7 metadata #152

Closed
PatrickJS opened this issue Dec 22, 2015 · 8 comments
Closed

include Reflect es7 metadata #152

PatrickJS opened this issue Dec 22, 2015 · 8 comments
Labels

Comments

@PatrickJS
Copy link

it would be great for angular2 if we only had to include core-js rather than es6-shim, es6-promise, and reflect-metadata
https://github.com/rbuckton/ReflectDecorators

@zloirock
Copy link
Owner

I think about it a few months. The problem here - it's not an official ES proposal. It's very simple for implementation, so I think makes sense add it as an experimental feature. Or wait for the next TC39 meeting - IIRC decorator proposal should be updated.

@PatrickJS
Copy link
Author

would it be too crazy to ask for an experimental folder path so all Angular 2 developer could rejoice
from

import 'es6-shim';
import 'es6-promise';
import 'es7-reflect-metadata/dist/browser';
import 'zone.js/lib/browser/zone-microtask';
import 'zone.js/lib/browser/long-stack-trace-zone';

to

import 'core-js/experimental';
import 'zone.js/lib/browser/zone-microtask';
import 'zone.js/lib/browser/long-stack-trace-zone';

then we only need to update zone.js

import 'core-js/experimental';
import 'zone.js/lib/browser/zone-microtask';

which could live in

import 'angular2/polyfills';

@zloirock
Copy link
Owner

cc @wycats @rbuckton what do you think about it? Any conflicts with changes in the decorators proposal? Perspectives as an official proposal?

@PatrickJS
Copy link
Author

thanks for adding it as experimental 👍

@zloirock
Copy link
Owner

@gdi2290 currently, I just play with it and explore possibilities. I think it can be added in the next minor release.

@zloirock
Copy link
Owner

zloirock commented Jan 3, 2016

I can add it right now as a pre-strawman feature (in this case it can be available not only in the 'core-js' entry point - also in 'core-js/shim' -> 'babel-polyfill'), but some problems confuse me:

  • Reflect.decorate missed in the spec text, but available in rbuckton/ReflectDecorators.
  • Fallback for GetPrototypeOf in rbuckton/ReflectDecorators for non-spec-compliant TypeScript (or Babel with proto-to-assign) classes. Sure, I can add the same fallback, but I don't think it's a good idea - inherited metadata will not work with constructors and statics if it will be implemented natively.
  • I don't see any feedback here or in the repo with the spec text from champions. Is this proposal alive? One more time: cc @wycats @rbuckton

@zloirock
Copy link
Owner

zloirock commented Feb 6, 2016

Ok. In the next minor version (2.1) - after some days - it will be enabled by default. If current implementation will cause any problems - it's already not my problems. The questions above, I don't see any answers.

@PatrickJS
Copy link
Author

thanks

filipesilva added a commit to IdeaBlade/angular.io that referenced this issue Jan 1, 2017
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
filipesilva added a commit to IdeaBlade/angular.io that referenced this issue Jan 2, 2017
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
filipesilva added a commit to angular/angular.io that referenced this issue Jan 2, 2017
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
filipesilva added a commit to angular/quickstart that referenced this issue Jan 2, 2017
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
unicodeveloper added a commit to unicodeveloper/angular-2-cloudinary that referenced this issue Jan 25, 2017
JohannesHoppe added a commit to angular-buch/schnellstart that referenced this issue Feb 5, 2017
abdel-ships-it pushed a commit to abdel-ships-it/angular.io that referenced this issue Feb 11, 2017
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
talent-programmer pushed a commit to talent-programmer/angular-quickstart that referenced this issue Nov 30, 2023
Blocked on angular/in-memory-web-api#86

As per zloirock/core-js#152, `core-js` already includes `reflect-metadata`.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants