definition.ts (angular-11.0.1) | : | definition.ts (angular-11.0.2) | ||
---|---|---|---|---|
/** | /** | |||
* @license | * @license | |||
* Copyright Google LLC All Rights Reserved. | * Copyright Google LLC All Rights Reserved. | |||
* | * | |||
* Use of this source code is governed by an MIT-style license that can be | * Use of this source code is governed by an MIT-style license that can be | |||
* found in the LICENSE file at https://angular.io/license | * found in the LICENSE file at https://angular.io/license | |||
*/ | */ | |||
import {SchemaMetadata, ViewEncapsulation} from '../../core'; | ||||
import {ProcessProvidersFunction} from '../../di/interface/provider'; | import {ProcessProvidersFunction} from '../../di/interface/provider'; | |||
import {Type} from '../../interface/type'; | import {Type} from '../../interface/type'; | |||
import {SchemaMetadata} from '../../metadata/schema'; | ||||
import {ViewEncapsulation} from '../../metadata/view'; | ||||
import {FactoryFn} from '../definition_factory'; | ||||
import {TAttributes, TConstantsOrFactory} from './node'; | import {TAttributes, TConstantsOrFactory} from './node'; | |||
import {CssSelectorList} from './projection'; | import {CssSelectorList} from './projection'; | |||
import {TView} from './view'; | import {TView} from './view'; | |||
/** | /** | |||
* Definition of what a template rendering function should look like for a compo nent. | * Definition of what a template rendering function should look like for a compo nent. | |||
*/ | */ | |||
export type ComponentTemplate<T> = { | export type ComponentTemplate<T> = { | |||
// Note: the ctx parameter is typed as T|U, as using only U would prevent a te mplate with | // Note: the ctx parameter is typed as T|U, as using only U would prevent a te mplate with | |||
skipping to change at line 39 | skipping to change at line 41 | |||
*/ | */ | |||
export type ViewQueriesFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => v oid; | export type ViewQueriesFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => v oid; | |||
/** | /** | |||
* Definition of what a content queries function should look like. | * Definition of what a content queries function should look like. | |||
*/ | */ | |||
export type ContentQueriesFunction<T> = | export type ContentQueriesFunction<T> = | |||
<U extends T>(rf: RenderFlags, ctx: U, directiveIndex: number) => void; | <U extends T>(rf: RenderFlags, ctx: U, directiveIndex: number) => void; | |||
/** | /** | |||
* Definition of what a factory function should look like. | ||||
*/ | ||||
export type FactoryFn<T> = { | ||||
/** | ||||
* Subclasses without an explicit constructor call through to the factory of t | ||||
heir base | ||||
* definition, providing it with their own constructor to instantiate. | ||||
*/ | ||||
<U extends T>(t: Type<U>): U; | ||||
/** | ||||
* If no constructor to instantiate is provided, an instance of type T itself | ||||
is created. | ||||
*/ | ||||
(t?: undefined): T; | ||||
}; | ||||
/** | ||||
* Flags passed into template functions to determine which blocks (i.e. creation , update) | * Flags passed into template functions to determine which blocks (i.e. creation , update) | |||
* should be executed. | * should be executed. | |||
* | * | |||
* Typically, a template runs both the creation block and the update block on in itialization and | * Typically, a template runs both the creation block and the update block on in itialization and | |||
* subsequent runs only execute the update block. However, dynamically created v iews require that | * subsequent runs only execute the update block. However, dynamically created v iews require that | |||
* the creation block be executed separately from the update block (for backward s compat). | * the creation block be executed separately from the update block (for backward s compat). | |||
*/ | */ | |||
export const enum RenderFlags { | export const enum RenderFlags { | |||
/* Whether to run the creation block (e.g. create elements and directives) */ | /* Whether to run the creation block (e.g. create elements and directives) */ | |||
Create = 0b01, | Create = 0b01, | |||
End of changes. 3 change blocks. | ||||
19 lines changed or deleted | 3 lines changed or added |