Skip to content

Commit 271e550

Browse files
committed
Adding reflect-metadata typings and cleaning up
1 parent 7e8f480 commit 271e550

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/igniteui.angular2.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
/// <reference path="jquery.d.ts" />
22
/// <reference path="igniteui.d.ts" />
3-
/// <reference path="./../typings/browser.d.ts"/>
43

54
import {Component, Directive, Inject, ElementRef, EventEmitter, Output, Input, Query, QueryList, Renderer, OnChanges, NgZone,
65
SimpleChange, ChangeDetectionStrategy, IterableDiffers, DoCheck, Optional} from '@angular/core';
76
import {NgModel, ControlValueAccessor} from '@angular/common';
87

98
declare var jQuery: any;
10-
declare var Reflect: any;
119

1210
var NODES = {
1311
"ig-text-editor": "input",
@@ -51,13 +49,11 @@ var NODES = {
5149
"ig-tile-manager": "div"
5250
};
5351

54-
const _reflect: any = Reflect;
55-
5652
export function IgComponent(args: any = {}) {
5753

5854
return function (cls) {
5955
// get current annotations
60-
let annotations = _reflect.getMetadata('annotations', cls) || [];
56+
let annotations = Reflect.getMetadata('annotations', cls) || [];
6157

6258
var sel = cls.name
6359
//transform Uppercase to dash + LowerCase letter
@@ -86,7 +82,7 @@ export function IgComponent(args: any = {}) {
8682
}
8783
annotations.push(new Component(args));
8884
// redefine with added annotations
89-
_reflect.defineMetadata('annotations', annotations, cls);
85+
Reflect.defineMetadata('annotations', annotations, cls);
9086

9187
return cls;
9288
}

typings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"ambientDependencies": {
33
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
44
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
5-
"node": "registry:dt/node#4.0.0+20160509154515"
5+
"node": "registry:dt/node#4.0.0+20160509154515",
6+
"reflect-metadata": "registry:dt/reflect-metadata#0.0.0+20160630155503"
67
}
7-
}
8+
}

0 commit comments

Comments
 (0)