diff --git a/packages/platform-browser/src/dom/debug/by.ts b/packages/platform-browser/src/dom/debug/by.ts index b8941f604c..2d7006b16f 100644 --- a/packages/platform-browser/src/dom/debug/by.ts +++ b/packages/platform-browser/src/dom/debug/by.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {DebugElement, Predicate, Type} from '@angular/core'; +import {DebugElement, DebugNode, Predicate, Type} from '@angular/core'; import {getDOM} from '../../dom/dom_adapter'; @@ -18,14 +18,14 @@ import {getDOM} from '../../dom/dom_adapter'; */ export class By { /** - * Match all elements. + * Match all nodes. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'} */ - static all(): Predicate { return (debugElement) => true; } + static all(): Predicate { return () => true; } /** * Match elements by the given CSS selector. @@ -44,14 +44,14 @@ export class By { } /** - * Match elements that have the given directive present. + * Match nodes that have the given directive present. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'} */ - static directive(type: Type): Predicate { - return (debugElement) => debugElement.providerTokens !.indexOf(type) !== -1; + static directive(type: Type): Predicate { + return (debugNode) => debugNode.providerTokens !.indexOf(type) !== -1; } } diff --git a/tools/public_api_guard/platform-browser/platform-browser.d.ts b/tools/public_api_guard/platform-browser/platform-browser.d.ts index e6a3d02824..1d380def79 100644 --- a/tools/public_api_guard/platform-browser/platform-browser.d.ts +++ b/tools/public_api_guard/platform-browser/platform-browser.d.ts @@ -9,9 +9,9 @@ export declare class BrowserTransferStateModule { } export declare class By { - static all(): Predicate; + static all(): Predicate; static css(selector: string): Predicate; - static directive(type: Type): Predicate; + static directive(type: Type): Predicate; } export declare function disableDebugTools(): void;