repackaging: all the repackaging changes squashed
This commit is contained in:
@ -85,4 +85,4 @@ export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata);
|
||||
/**
|
||||
* Factory for creating {@link SkipSelfMetadata}.
|
||||
*/
|
||||
export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata);
|
||||
export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Type, stringify, isFunction} from 'angular2/src/facade/lang';
|
||||
import {Type, stringify, isFunction} from '../../src/facade/lang';
|
||||
|
||||
/**
|
||||
* An interface that a function passed into {@link forwardRef} has to implement.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {unimplemented} from '../../src/facade/exceptions';
|
||||
|
||||
const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object();
|
||||
export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {stringify, isBlank, isPresent} from "angular2/src/facade/lang";
|
||||
import {stringify} from '../../src/facade/lang';
|
||||
|
||||
/**
|
||||
* A parameter metadata that specifies a dependency.
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Creates a token that can be used in a DI Provider.
|
||||
*
|
||||
|
@ -5,8 +5,8 @@ import {
|
||||
isBlank,
|
||||
isFunction,
|
||||
stringify
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
/**
|
||||
* Describes how the {@link Injector} should instantiate a given token.
|
||||
|
20
modules/@angular/core/src/di/provider_util.dart
Normal file
20
modules/@angular/core/src/di/provider_util.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import './provider.dart' show Provider;
|
||||
|
||||
bool isProviderLiteral(dynamic obj) {
|
||||
if (obj is Map) {
|
||||
Map map = obj as Map;
|
||||
return map.containsKey('provide');
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Provider createProvider(dynamic obj) {
|
||||
Map map = obj as Map;
|
||||
return new Provider(map['provide'], useClass: map['useClass'],
|
||||
useValue: map['useValue'],
|
||||
useExisting: map['useExisting'],
|
||||
useFactory: map['useFactory'],
|
||||
deps: map['deps'],
|
||||
multi: map['multi']);
|
||||
}
|
9
modules/@angular/core/src/di/provider_util.ts
Normal file
9
modules/@angular/core/src/di/provider_util.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import {Provider} from './provider';
|
||||
|
||||
export function isProviderLiteral(obj: any): boolean {
|
||||
return obj && typeof obj == 'object' && obj.provide;
|
||||
}
|
||||
|
||||
export function createProvider(obj: any): Provider {
|
||||
return new Provider(obj.provide, obj);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {stringify, isBlank} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException, unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
import {stringify, isBlank} from '../../src/facade/lang';
|
||||
import {BaseException, WrappedException} from '../../src/facade/exceptions';
|
||||
import {ReflectiveKey} from './reflective_key';
|
||||
import {ReflectiveInjector} from './reflective_injector';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Provider, ProviderBuilder, provide} from './provider';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
import {Provider} from './provider';
|
||||
import {
|
||||
ResolvedReflectiveProvider,
|
||||
ReflectiveDependency,
|
||||
@ -11,13 +11,12 @@ import {
|
||||
NoProviderError,
|
||||
CyclicDependencyError,
|
||||
InstantiationError,
|
||||
InvalidProviderError,
|
||||
OutOfBoundsError
|
||||
} from './reflective_exceptions';
|
||||
import {Type, isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException, unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {Type} from '../../src/facade/lang';
|
||||
import {BaseException, unimplemented} from '../../src/facade/exceptions';
|
||||
import {ReflectiveKey} from './reflective_key';
|
||||
import {SelfMetadata, HostMetadata, SkipSelfMetadata} from './metadata';
|
||||
import {SelfMetadata, SkipSelfMetadata} from './metadata';
|
||||
import {Injector, THROW_IF_NOT_FOUND} from './injector';
|
||||
|
||||
var __unused: Type; // avoid unused import when Type union types are erased
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {stringify, Type, isBlank} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {stringify, isBlank} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {resolveForwardRef} from './forward_ref';
|
||||
|
||||
/**
|
||||
|
@ -1,10 +1,14 @@
|
||||
import {Type, isBlank, isPresent, isArray, isType} from 'angular2/src/facade/lang';
|
||||
import {MapWrapper, ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {
|
||||
Type,
|
||||
isBlank,
|
||||
isPresent,
|
||||
isArray,
|
||||
} from '../../src/facade/lang';
|
||||
import {MapWrapper, ListWrapper} from '../../src/facade/collection';
|
||||
import {reflector} from '../reflection/reflection';
|
||||
import {ReflectiveKey} from './reflective_key';
|
||||
import {
|
||||
InjectMetadata,
|
||||
InjectableMetadata,
|
||||
OptionalMetadata,
|
||||
SelfMetadata,
|
||||
HostMetadata,
|
||||
|
Reference in New Issue
Block a user