chore: audit @angular/core API classification (#8808)

This commit is contained in:
Miško Hevery
2016-05-25 15:00:05 -07:00
parent 5e0f8cf3f0
commit 39ecd01b86
72 changed files with 245 additions and 561 deletions

View File

@ -5,6 +5,9 @@ import {RenderDebugInfo} from '../render/api';
export class EventListener { constructor(public name: string, public callback: Function){}; }
/**
* @experimental
*/
export class DebugNode {
nativeNode: any;
listeners: EventListener[];
@ -46,6 +49,9 @@ export class DebugNode {
inject(token: any): any { return this.injector.get(token); }
}
/**
* @experimental
*/
export class DebugElement extends DebugNode {
name: string;
properties: {[key: string]: string};
@ -129,6 +135,9 @@ export class DebugElement extends DebugNode {
}
}
/**
* @experimental
*/
export function asNativeElements(debugEls: DebugElement[]): any {
return debugEls.map((el) => el.nativeElement);
}
@ -162,6 +171,9 @@ function _queryNodeChildren(parentNode: DebugNode, predicate: Predicate<DebugNod
// Need to keep the nodes in a global Map so that multiple angular apps are supported.
var _nativeNodeToDebugNode = new Map<any, DebugNode>();
/**
* @experimental
*/
export function getDebugNode(nativeNode: any): DebugNode {
return _nativeNodeToDebugNode.get(nativeNode);
}