refactor(Type): merge Type and ConcreType<?> into Type<?> (#10616)

Closes #9729

BREAKING CHANGE:

`Type` is now `Type<T>` which means that in most cases you have to
use `Type<any>` in place of `Type`.

We don't expect that any user applications use the `Type` type.
This commit is contained in:
Miško Hevery
2016-08-10 18:21:28 -07:00
committed by vikerman
parent 6f4ee6101c
commit b96869afd2
91 changed files with 637 additions and 714 deletions

View File

@ -6,13 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectionStrategy, SchemaMetadata, ViewEncapsulation} from '@angular/core';
import {ChangeDetectionStrategy, SchemaMetadata, Type, ViewEncapsulation} from '@angular/core';
import {LifecycleHooks, reflector} from '../core_private';
import {ListWrapper, StringMapWrapper} from './facade/collection';
import {BaseException, unimplemented} from './facade/exceptions';
import {Type, isBlank, isPresent, isStringMap, normalizeBlank, normalizeBool} from './facade/lang';
import {isBlank, isPresent, isStringMap, normalizeBlank, normalizeBool} from './facade/lang';
import {CssSelector} from './selector';
import {getUrlScheme} from './url_resolver';
import {sanitizeIdentifier, splitAtColon} from './util';
@ -308,7 +308,7 @@ export class CompileTypeMetadata extends CompileIdentifierMetadata {
lifecycleHooks: LifecycleHooks[];
constructor({runtime, name, moduleUrl, prefix, isHost, value, diDeps, lifecycleHooks}: {
runtime?: Type,
runtime?: Type<any>,
name?: string,
moduleUrl?: string,
prefix?: string,
@ -685,8 +685,8 @@ export class CompileNgModuleMetadata implements CompileMetadataWithIdentifier {
}
export class TransitiveCompileNgModuleMetadata {
directivesSet = new Set<Type>();
pipesSet = new Set<Type>();
directivesSet = new Set<Type<any>>();
pipesSet = new Set<Type<any>>();
constructor(
public modules: CompileNgModuleMetadata[], public providers: CompileProviderMetadata[],
public entryComponents: CompileTypeMetadata[], public directives: CompileDirectiveMetadata[],