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:
@ -6,11 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {DebugElement} from '@angular/core';
|
||||
import {DebugElement, Type} from '@angular/core';
|
||||
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
import {Predicate} from '../../facade/collection';
|
||||
import {Type, isPresent} from '../../facade/lang';
|
||||
import {isPresent} from '../../facade/lang';
|
||||
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ export class By {
|
||||
*
|
||||
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
||||
*/
|
||||
static directive(type: Type): Predicate<DebugElement> {
|
||||
static directive(type: Type<any>): Predicate<DebugElement> {
|
||||
return (debugElement) => { return debugElement.providerTokens.indexOf(type) !== -1; };
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Type, isBlank} from '../facade/lang';
|
||||
import {Type} from '@angular/core';
|
||||
|
||||
import {isBlank} from '../facade/lang';
|
||||
|
||||
var _DOM: DomAdapter = null;
|
||||
|
||||
@ -29,7 +31,7 @@ export function setRootDomAdapter(adapter: DomAdapter) {
|
||||
* Provides DOM operations in an environment-agnostic way.
|
||||
*/
|
||||
export abstract class DomAdapter {
|
||||
public xhrType: Type = null;
|
||||
public xhrType: Type<any> = null;
|
||||
abstract hasProperty(element: any /** TODO #9100 */, name: string): boolean;
|
||||
abstract setProperty(el: Element, name: string, value: any): any /** TODO #9100 */;
|
||||
abstract getProperty(el: Element, name: string): any;
|
||||
@ -41,7 +43,7 @@ export abstract class DomAdapter {
|
||||
abstract logGroupEnd(): any /** TODO #9100 */;
|
||||
|
||||
/** @deprecated */
|
||||
getXHR(): Type { return this.xhrType; }
|
||||
getXHR(): Type<any> { return this.xhrType; }
|
||||
|
||||
/**
|
||||
* Maps attribute names to their corresponding property names for cases
|
||||
|
Reference in New Issue
Block a user