Hi,
I've tried to find out all the metadata that has been defined with
decorators. For this, I wrote the following snippet:
var keys = Reflect.getMetadataKeys(App);
// Iterate all metadata-keys
for(var key of keys) {
console.debug(key);
var metadata = Reflect.getMetadata(key, App);
console.debug(metadata);
console.debug("------------");
}
That works fine, but in order to make typescript to compile it, I have to
add an ambient declaration:
declare var Reflect: any;
Without this declaration, typescript thinks that there is another
Reflect-Object with other properties (methods like get and set).
I belive, that adding this ambient declaration to override the current
Reflect-type to align it with the Reflect-object that exists at runtime, is
a quite a dirty way for getting it done.
So I'm wondering how the "clean way" looks like.
Wishes,
Manfred
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.