Project

General

Profile

1
/**
2
 * @license
3
 * Copyright Google Inc. All Rights Reserved.
4
 *
5
 * Use of this source code is governed by an MIT-style license that can be
6
 * found in the LICENSE file at https://angular.io/license
7
 */
8
import { CompileReflector, DirectiveResolver } from '@angular/compiler';
9
import { Directive, Injector, Provider, Type, ɵViewMetadata as ViewMetadata } from '@angular/core';
10
/**
11
 * An implementation of {@link DirectiveResolver} that allows overriding
12
 * various properties of directives.
13
 */
14
export declare class MockDirectiveResolver extends DirectiveResolver {
15
    private _injector;
16
    private _directives;
17
    private _providerOverrides;
18
    private _viewProviderOverrides;
19
    private _views;
20
    private _inlineTemplates;
21
    constructor(_injector: Injector, reflector: CompileReflector);
22
    private readonly _compiler;
23
    private _clearCacheFor(component);
24
    resolve(type: Type<any>): Directive;
25
    resolve(type: Type<any>, throwIfNotFound: true): Directive;
26
    resolve(type: Type<any>, throwIfNotFound: boolean): Directive | null;
27
    /**
28
     * Overrides the {@link Directive} for a directive.
29
     */
30
    setDirective(type: Type<any>, metadata: Directive): void;
31
    setProvidersOverride(type: Type<any>, providers: Provider[]): void;
32
    setViewProvidersOverride(type: Type<any>, viewProviders: Provider[]): void;
33
    /**
34
     * Overrides the {@link ViewMetadata} for a component.
35
     */
36
    setView(component: Type<any>, view: ViewMetadata): void;
37
    /**
38
     * Overrides the inline template for a component - other configuration remains unchanged.
39
     */
40
    setInlineTemplate(component: Type<any>, template: string): void;
41
}
(1-1/12)