refactor(injector): use @CONST to create the Inject annotation
This commit is contained in:
parent
f63a5dd158
commit
a814d48bbc
|
@ -1,7 +1,8 @@
|
|||
//TODO: vsavkin: uncomment once const constructor are supported
|
||||
//export class Inject {
|
||||
// @CONST
|
||||
// constructor(token){
|
||||
// this.token = token;
|
||||
// }
|
||||
//}
|
||||
import {CONST} from "facade/lang";
|
||||
|
||||
export class Inject {
|
||||
@CONST()
|
||||
constructor(token){
|
||||
this.token = token;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import {Type} from 'facade/lang';
|
||||
import {List, MapWrapper, ListWrapper} from 'facade/collection';
|
||||
import {Reflector} from 'facade/di/reflector';
|
||||
import {Reflector} from './reflector';
|
||||
import {Key} from './key';
|
||||
|
||||
export class Binding {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export * from './annotations';
|
||||
export * from './injector';
|
||||
export * from './binding';
|
||||
export * from './key';
|
||||
export * from './module';
|
||||
export {Inject} from 'facade/di/reflector';
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
library facade.di.reflector;
|
||||
|
||||
import 'dart:mirrors';
|
||||
|
||||
class Inject {
|
||||
final Object token;
|
||||
const Inject(this.token);
|
||||
}
|
||||
import 'annotations.dart' show Inject;
|
||||
|
||||
class Reflector {
|
||||
factoryFor(Type type) {
|
|
@ -1,11 +1,5 @@
|
|||
import {Type} from 'facade/lang';
|
||||
|
||||
//TODO: vsvakin: remove when const constructors are implemented
|
||||
export class Inject {
|
||||
constructor(token){
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
import {Inject} from './annotations';
|
||||
|
||||
export class Reflector {
|
||||
factoryFor(type:Type) {
|
Loading…
Reference in New Issue