refactor(ivy): use ɵɵ instead of Δ for now (#29850)

The `Δ` caused issue with other infrastructure, and we are temporarily
changing it to `ɵɵ`.

This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`.

PR Close #29850
This commit is contained in:
Alex Rickabaugh
2019-04-11 13:46:47 -07:00
parent 54058ba3a7
commit b0578061ce
146 changed files with 8037 additions and 8005 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ΔdefineInjectable} from '../../di/interface/defs';
import {ɵɵdefineInjectable} from '../../di/interface/defs';
import {StaticProvider} from '../../di/interface/provider';
import {Optional, SkipSelf} from '../../di/metadata';
import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
@ -143,7 +143,7 @@ export interface IterableDifferFactory {
*/
export class IterableDiffers {
/** @nocollapse */
static ngInjectableDef = ΔdefineInjectable({
static ngInjectableDef = ɵɵdefineInjectable({
providedIn: 'root',
factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])
});

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Optional, SkipSelf, StaticProvider, ΔdefineInjectable} from '../../di';
import {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';
import {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';
@ -118,7 +118,7 @@ export interface KeyValueDifferFactory {
*/
export class KeyValueDiffers {
/** @nocollapse */
static ngInjectableDef = ΔdefineInjectable({
static ngInjectableDef = ɵɵdefineInjectable({
providedIn: 'root',
factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])
});

View File

@ -13,8 +13,8 @@ export {devModeEqual as ɵdevModeEqual} from './change_detection/change_detectio
export {isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';
export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';
export {Console as ɵConsole} from './console';
export {inject, setCurrentInjector as ɵsetCurrentInjector, Δinject} from './di/injector_compatibility';
export {getInjectableDef as ɵgetInjectableDef, ΔInjectableDef as ΔInjectableDef, ΔInjectorDef} from './di/interface/defs';
export {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility';
export {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDef as ɵɵInjectableDef, ɵɵInjectorDef} from './di/interface/defs';
export {APP_ROOT as ɵAPP_ROOT} from './di/scope';
export {ivyEnabled as ɵivyEnabled} from './ivy_switch';
export {ComponentFactory as ɵComponentFactory} from './linker/component_factory';

View File

@ -8,11 +8,11 @@
// clang-format off
export {
ΔdefineBase,
ΔdefineComponent,
ΔdefineDirective,
ΔdefinePipe,
ΔdefineNgModule,
ɵɵdefineBase,
ɵɵdefineComponent,
ɵɵdefineDirective,
ɵɵdefinePipe,
ɵɵdefineNgModule,
detectChanges as ɵdetectChanges,
renderComponent as ɵrenderComponent,
AttributeMarker as ɵAttributeMarker,
@ -21,16 +21,16 @@ export {
ComponentRef as ɵRender3ComponentRef,
DirectiveType as ɵDirectiveType,
RenderFlags as ɵRenderFlags,
ΔdirectiveInject,
ΔinjectAttribute,
ΔgetFactoryOf,
ΔgetInheritedFactory,
ΔsetComponentScope,
ΔsetNgModuleScope,
ΔtemplateRefExtractor,
ΔProvidersFeature,
ΔInheritDefinitionFeature,
ΔNgOnChangesFeature,
ɵɵdirectiveInject,
ɵɵinjectAttribute,
ɵɵgetFactoryOf,
ɵɵgetInheritedFactory,
ɵɵsetComponentScope,
ɵɵsetNgModuleScope,
ɵɵtemplateRefExtractor,
ɵɵProvidersFeature,
ɵɵInheritDefinitionFeature,
ɵɵNgOnChangesFeature,
LifecycleHooksFeature as ɵLifecycleHooksFeature,
NgModuleType as ɵNgModuleType,
NgModuleRef as ɵRender3NgModuleRef,
@ -38,108 +38,108 @@ export {
markDirty as ɵmarkDirty,
NgModuleFactory as ɵNgModuleFactory,
NO_CHANGE as ɵNO_CHANGE,
Δcontainer,
ΔnextContext,
ΔelementStart,
ΔnamespaceHTML,
ΔnamespaceMathML,
ΔnamespaceSVG,
Δelement,
Δlistener,
Δtext,
ΔembeddedViewStart,
Δprojection,
Δbind,
Δinterpolation1,
Δinterpolation2,
Δinterpolation3,
Δinterpolation4,
Δinterpolation5,
Δinterpolation6,
Δinterpolation7,
Δinterpolation8,
ΔinterpolationV,
ΔpipeBind1,
ΔpipeBind2,
ΔpipeBind3,
ΔpipeBind4,
ΔpipeBindV,
ΔpureFunction0,
ΔpureFunction1,
ΔpureFunction2,
ΔpureFunction3,
ΔpureFunction4,
ΔpureFunction5,
ΔpureFunction6,
ΔpureFunction7,
ΔpureFunction8,
ΔpureFunctionV,
ΔgetCurrentView,
ɵɵcontainer,
ɵɵnextContext,
ɵɵelementStart,
ɵɵnamespaceHTML,
ɵɵnamespaceMathML,
ɵɵnamespaceSVG,
ɵɵelement,
ɵɵlistener,
ɵɵtext,
ɵɵembeddedViewStart,
ɵɵprojection,
ɵɵbind,
ɵɵinterpolation1,
ɵɵinterpolation2,
ɵɵinterpolation3,
ɵɵinterpolation4,
ɵɵinterpolation5,
ɵɵinterpolation6,
ɵɵinterpolation7,
ɵɵinterpolation8,
ɵɵinterpolationV,
ɵɵpipeBind1,
ɵɵpipeBind2,
ɵɵpipeBind3,
ɵɵpipeBind4,
ɵɵpipeBindV,
ɵɵpureFunction0,
ɵɵpureFunction1,
ɵɵpureFunction2,
ɵɵpureFunction3,
ɵɵpureFunction4,
ɵɵpureFunction5,
ɵɵpureFunction6,
ɵɵpureFunction7,
ɵɵpureFunction8,
ɵɵpureFunctionV,
ɵɵgetCurrentView,
getDirectives as ɵgetDirectives,
getHostElement as ɵgetHostElement,
ΔrestoreView,
ΔcontainerRefreshStart,
ΔcontainerRefreshEnd,
ΔqueryRefresh,
ΔviewQuery,
ΔstaticViewQuery,
ΔstaticContentQuery,
ΔloadViewQuery,
ΔcontentQuery,
ΔloadContentQuery,
ΔelementEnd,
ΔelementProperty,
ΔcomponentHostSyntheticProperty,
ΔcomponentHostSyntheticListener,
ΔprojectionDef,
Δreference,
ΔenableBindings,
ΔdisableBindings,
ΔallocHostVars,
ΔelementAttribute,
ΔelementContainerStart,
ΔelementContainerEnd,
ΔelementStyling,
ΔelementStylingMap,
ΔelementStyleProp,
ΔelementStylingApply,
ΔelementClassProp,
ɵɵrestoreView,
ɵɵcontainerRefreshStart,
ɵɵcontainerRefreshEnd,
ɵɵqueryRefresh,
ɵɵviewQuery,
ɵɵstaticViewQuery,
ɵɵstaticContentQuery,
ɵɵloadViewQuery,
ɵɵcontentQuery,
ɵɵloadContentQuery,
ɵɵelementEnd,
ɵɵelementProperty,
ɵɵcomponentHostSyntheticProperty,
ɵɵcomponentHostSyntheticListener,
ɵɵprojectionDef,
ɵɵreference,
ɵɵenableBindings,
ɵɵdisableBindings,
ɵɵallocHostVars,
ɵɵelementAttribute,
ɵɵelementContainerStart,
ɵɵelementContainerEnd,
ɵɵelementStyling,
ɵɵelementStylingMap,
ɵɵelementStyleProp,
ɵɵelementStylingApply,
ɵɵelementClassProp,
ΔelementHostAttrs,
ΔelementHostStyling,
ΔelementHostStylingMap,
ΔelementHostStyleProp,
ΔelementHostClassProp,
ΔelementHostStylingApply,
ɵɵelementHostAttrs,
ɵɵelementHostStyling,
ɵɵelementHostStylingMap,
ɵɵelementHostStyleProp,
ɵɵelementHostClassProp,
ɵɵelementHostStylingApply,
Δselect,
ΔtextBinding,
Δtemplate,
ΔembeddedViewEnd,
ɵɵselect,
ɵɵtextBinding,
ɵɵtemplate,
ɵɵembeddedViewEnd,
store as ɵstore,
Δload,
Δpipe,
ΔBaseDef,
ɵɵload,
ɵɵpipe,
ɵɵBaseDef,
ComponentDef as ɵComponentDef,
ΔComponentDefWithMeta,
ɵɵComponentDefWithMeta,
DirectiveDef as ɵDirectiveDef,
ΔDirectiveDefWithMeta,
ɵɵDirectiveDefWithMeta,
PipeDef as ɵPipeDef,
ΔPipeDefWithMeta,
ɵɵPipeDefWithMeta,
whenRendered as ɵwhenRendered,
Δi18n,
Δi18nAttributes,
Δi18nExp,
Δi18nStart,
Δi18nEnd,
Δi18nApply,
Δi18nPostprocess,
ɵɵi18n,
ɵɵi18nAttributes,
ɵɵi18nExp,
ɵɵi18nStart,
ɵɵi18nEnd,
ɵɵi18nApply,
ɵɵi18nPostprocess,
i18nConfigureLocalize as ɵi18nConfigureLocalize,
Δi18nLocalize,
ɵɵi18nLocalize,
setClassMetadata as ɵsetClassMetadata,
ΔresolveWindow,
ΔresolveDocument,
ΔresolveBody,
ɵɵresolveWindow,
ɵɵresolveDocument,
ɵɵresolveBody,
} from './render3/index';
@ -161,18 +161,18 @@ export {
export {
NgModuleDef as ɵNgModuleDef,
ΔNgModuleDefWithMeta,
ɵɵNgModuleDefWithMeta,
NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,
} from './metadata/ng_module';
export {
ΔsanitizeHtml,
ΔsanitizeStyle,
ΔdefaultStyleSanitizer,
ΔsanitizeScript,
ΔsanitizeUrl,
ΔsanitizeResourceUrl,
ΔsanitizeUrlOrResourceUrl,
ɵɵsanitizeHtml,
ɵɵsanitizeStyle,
ɵɵdefaultStyleSanitizer,
ɵɵsanitizeScript,
ɵɵsanitizeUrl,
ɵɵsanitizeResourceUrl,
ɵɵsanitizeUrlOrResourceUrl,
} from './sanitization/sanitization';
export {

View File

@ -14,11 +14,11 @@
export * from './metadata';
export {InjectFlags} from './interface/injector';
export {ΔdefineInjectable, defineInjectable, ΔdefineInjector, InjectableType, InjectorType} from './interface/defs';
export {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';
export {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';
export {Injectable, InjectableDecorator, InjectableProvider} from './injectable';
export {INJECTOR, Injector} from './injector';
export {Δinject, inject} from './injector_compatibility';
export {ɵɵinject, inject} from './injector_compatibility';
export {ReflectiveInjector} from './reflective_injector';
export {StaticProvider, ValueProvider, ConstructorSansProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ClassProvider} from './interface/provider';
export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';

View File

@ -9,7 +9,7 @@
import {Type} from '../interface/type';
import {TypeDecorator, makeDecorator} from '../util/decorators';
import {InjectableType, getInjectableDef, ΔInjectableDef, ΔdefineInjectable} from './interface/defs';
import {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs';
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';
import {compileInjectable as render3CompileInjectable} from './jit/injectable';
import {convertInjectableProviderToFactory} from './util';
@ -80,7 +80,7 @@ export const Injectable: InjectableDecorator = makeDecorator(
*
* @publicApi
*/
export interface InjectableType<T> extends Type<T> { ngInjectableDef: ΔInjectableDef<T>; }
export interface InjectableType<T> extends Type<T> { ngInjectableDef: ɵɵInjectableDef<T>; }
/**
* Supports @Injectable() in JIT mode for Render2.
@ -89,7 +89,7 @@ function render2CompileInjectable(
injectableType: InjectableType<any>,
options: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {
if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
injectableType.ngInjectableDef = ΔdefineInjectable({
injectableType.ngInjectableDef = ɵɵdefineInjectable({
providedIn: options.providedIn,
factory: convertInjectableProviderToFactory(injectableType, options),
});

View File

@ -8,7 +8,7 @@
import {Type} from '../interface/type';
import {ΔdefineInjectable} from './interface/defs';
import {ɵɵdefineInjectable} from './interface/defs';
/**
* Creates a token that can be used in a DI Provider.
@ -67,7 +67,7 @@ export class InjectionToken<T> {
// We are using it to assign `-1` which is used to identify `Injector`.
(this as any).__NG_ELEMENT_ID__ = options;
} else if (options !== undefined) {
this.ngInjectableDef = ΔdefineInjectable({
this.ngInjectableDef = ɵɵdefineInjectable({
providedIn: options.providedIn || 'root',
factory: options.factory,
});

View File

@ -11,8 +11,8 @@ import {getClosureSafeProperty} from '../util/property';
import {stringify} from '../util/stringify';
import {resolveForwardRef} from './forward_ref';
import {InjectionToken} from './injection_token';
import {Δinject} from './injector_compatibility';
import {ΔdefineInjectable} from './interface/defs';
import {ɵɵinject} from './injector_compatibility';
import {ɵɵdefineInjectable} from './interface/defs';
import {InjectFlags} from './interface/injector';
import {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';
import {Inject, Optional, Self, SkipSelf} from './metadata';
@ -107,9 +107,9 @@ export abstract class Injector {
}
/** @nocollapse */
static ngInjectableDef = ΔdefineInjectable({
static ngInjectableDef = ɵɵdefineInjectable({
providedIn: 'any' as any,
factory: () => Δinject(INJECTOR),
factory: () => ɵɵinject(INJECTOR),
});
/**

View File

@ -11,7 +11,7 @@ import {stringify} from '../util/stringify';
import {InjectionToken} from './injection_token';
import {Injector} from './injector';
import {getInjectableDef, ΔInjectableDef} from './interface/defs';
import {getInjectableDef, ɵɵInjectableDef} from './interface/defs';
import {InjectFlags} from './interface/injector';
import {Inject, Optional, Self, SkipSelf} from './metadata';
@ -97,17 +97,18 @@ export function injectInjectorOnly<T>(
*
* @publicApi
*/
export function Δinject<T>(token: Type<T>| InjectionToken<T>): T;
export function Δinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
export function Δinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|
null {
return (_injectImplementation || injectInjectorOnly)(token, flags);
}
/**
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
* code should now use Δinject instead.
* code should now use ɵɵinject instead.
* @publicApi
*/
export const inject = Δinject;
export const inject = ɵɵinject;
/**
* Injects `root` tokens in limp mode.
@ -118,7 +119,7 @@ export const inject = Δinject;
*/
export function injectRootLimpMode<T>(
token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {
const injectableDef: ΔInjectableDef<T>|null = getInjectableDef(token);
const injectableDef: ɵɵInjectableDef<T>|null = getInjectableDef(token);
if (injectableDef && injectableDef.providedIn == 'root') {
return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
injectableDef.value;
@ -154,9 +155,9 @@ export function injectArgs(types: (Type<any>| InjectionToken<any>| any[])[]): an
}
}
args.push(Δinject(type !, flags));
args.push(ɵɵinject(type !, flags));
} else {
args.push(Δinject(arg));
args.push(ɵɵinject(arg));
}
}
return args;

View File

@ -26,7 +26,7 @@ import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, S
*
* @publicApi
*/
export interface ΔInjectableDef<T> {
export interface ɵɵInjectableDef<T> {
/**
* Specifies that the given type belongs to a particular injector:
* - `InjectorType` such as `NgModule`,
@ -60,7 +60,7 @@ export interface ΔInjectableDef<T> {
*
* @publicApi
*/
export interface ΔInjectorDef<T> {
export interface ɵɵInjectorDef<T> {
factory: () => T;
// TODO(alxhub): Narrow down the type here once decorators properly change the return type of the
@ -131,21 +131,21 @@ export interface InjectorTypeWithProviders<T> {
*
* @publicApi
*/
export function ΔdefineInjectable<T>(opts: {
export function ɵɵdefineInjectable<T>(opts: {
providedIn?: Type<any>| 'root' | 'any' | null,
factory: () => T,
}): never {
return ({
providedIn: opts.providedIn as any || null, factory: opts.factory, value: undefined,
} as ΔInjectableDef<T>) as never;
} as ɵɵInjectableDef<T>) as never;
}
/**
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
* code should now use ΔdefineInjectable instead.
* code should now use ɵɵdefineInjectable instead.
* @publicApi
*/
export const defineInjectable = ΔdefineInjectable;
export const defineInjectable = ɵɵdefineInjectable;
/**
* Construct an `InjectorDef` which configures an injector.
@ -167,11 +167,11 @@ export const defineInjectable = ΔdefineInjectable;
*
* @publicApi
*/
export function ΔdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):
export function ɵɵdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):
never {
return ({
factory: options.factory, providers: options.providers || [], imports: options.imports || [],
} as ΔInjectorDef<any>) as never;
} as ɵɵInjectorDef<any>) as never;
}
/**
@ -179,7 +179,7 @@ export function ΔdefineInjector(options: {factory: () => any, providers?: any[]
*
* @param type type which may have `ngInjectableDef`
*/
export function getInjectableDef<T>(type: any): ΔInjectableDef<T>|null {
export function getInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {
return type && type.hasOwnProperty(NG_INJECTABLE_DEF) ? (type as any)[NG_INJECTABLE_DEF] : null;
}
@ -188,7 +188,7 @@ export function getInjectableDef<T>(type: any): ΔInjectableDef<T>|null {
*
* @param type type which may have `ngInjectorDef`
*/
export function getInjectorDef<T>(type: any): ΔInjectorDef<T>|null {
export function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {
return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;
}

View File

@ -7,8 +7,8 @@
*/
import {Type} from '../../interface/type';
import {Δinject} from '../injector_compatibility';
import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector} from '../interface/defs';
import {ɵɵinject} from '../injector_compatibility';
import {getInjectableDef, getInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';
@ -18,10 +18,10 @@ import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector}
* This should be kept up to date with the public exports of @angular/core.
*/
export const angularCoreDiEnv: {[name: string]: Function} = {
'ΔdefineInjectable': ΔdefineInjectable,
'ΔdefineInjector': ΔdefineInjector,
'Δinject': Δinject,
'ΔgetFactoryOf': getFactoryOf,
'ɵɵdefineInjectable': ɵɵdefineInjectable,
'ɵɵdefineInjector': ɵɵdefineInjector,
'ɵɵinject': ɵɵinject,
'ɵɵgetFactoryOf': getFactoryOf,
};
function getFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {

View File

@ -13,8 +13,8 @@ import {stringify} from '../util/stringify';
import {resolveForwardRef} from './forward_ref';
import {InjectionToken} from './injection_token';
import {INJECTOR, Injector, NG_TEMP_TOKEN_PATH, NullInjector, USE_VALUE, catchInjectorError} from './injector';
import {injectArgs, setCurrentInjector, Δinject} from './injector_compatibility';
import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ΔInjectableDef} from './interface/defs';
import {injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility';
import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ɵɵInjectableDef} from './interface/defs';
import {InjectFlags} from './interface/injector';
import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';
import {APP_ROOT} from './scope';
@ -356,7 +356,7 @@ export class R3Injector {
return record.value as T;
}
private injectableDefInScope(def: ΔInjectableDef<any>): boolean {
private injectableDefInScope(def: ɵɵInjectableDef<any>): boolean {
if (!def.providedIn) {
return false;
} else if (typeof def.providedIn === 'string') {
@ -413,7 +413,7 @@ export function providerToFactory(
if (isValueProvider(provider)) {
factory = () => resolveForwardRef(provider.useValue);
} else if (isExistingProvider(provider)) {
factory = () => Δinject(resolveForwardRef(provider.useExisting));
factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));
} else if (isFactoryProvider(provider)) {
factory = () => provider.useFactory(...injectArgs(provider.deps || []));
} else {

View File

@ -10,7 +10,7 @@ import {Type} from '../interface/type';
import {ReflectionCapabilities} from '../reflection/reflection_capabilities';
import {getClosureSafeProperty} from '../util/property';
import {injectArgs, Δinject} from './injector_compatibility';
import {injectArgs, ɵɵinject} from './injector_compatibility';
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';
const USE_VALUE =
@ -32,7 +32,7 @@ export function convertInjectableProviderToFactory(
return () => valueProvider.useValue;
} else if ((provider as ExistingSansProvider).useExisting) {
const existingProvider = (provider as ExistingSansProvider);
return () => Δinject(existingProvider.useExisting);
return () => ɵɵinject(existingProvider.useExisting);
} else if ((provider as FactorySansProvider).useFactory) {
const factoryProvider = (provider as FactorySansProvider);
return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));

View File

@ -7,7 +7,7 @@
*/
import {ApplicationRef} from '../application_ref';
import {InjectorType, ΔdefineInjector} from '../di/interface/defs';
import {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';
import {Provider} from '../di/interface/provider';
import {convertInjectableProviderToFactory} from '../di/util';
import {Type} from '../interface/type';
@ -35,7 +35,7 @@ export interface NgModuleTransitiveScopes {
/**
* @publicApi
*/
export type ΔNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;
export type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;
/**
* Runtime link information for NgModules.
@ -43,7 +43,7 @@ export type ΔNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleD
* This is the internal data structure used by the runtime to assemble components, directives,
* pipes, and injectors.
*
* NOTE: Always use `ΔdefineNgModule` function to create this object,
* NOTE: Always use `ɵɵdefineNgModule` function to create this object,
* never create the object directly since the shape of this object
* can change between versions.
*/
@ -347,7 +347,7 @@ function preR3NgModuleCompile(moduleType: InjectorType<any>, metadata: NgModule)
imports = [...imports, metadata.exports];
}
moduleType.ngInjectorDef = ΔdefineInjector({
moduleType.ngInjectorDef = ɵɵdefineInjector({
factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),
providers: metadata && metadata.providers,
imports: imports,

View File

@ -21,10 +21,10 @@
* The below symbols are used for @Injectable and @NgModule compilation.
*/
export {Δinject} from './di/injector_compatibility';
export {ΔInjectableDef, ΔInjectorDef, ΔdefineInjectable, ΔdefineInjector} from './di/interface/defs';
export {NgModuleDef, ΔNgModuleDefWithMeta} from './metadata/ng_module';
export {ΔdefineNgModule} from './render3/definition';
export {ɵɵinject} from './di/injector_compatibility';
export {ɵɵInjectableDef, ɵɵInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from './di/interface/defs';
export {NgModuleDef, ɵɵNgModuleDefWithMeta} from './metadata/ng_module';
export {ɵɵdefineNgModule} from './render3/definition';
export {setClassMetadata} from './render3/metadata';
export {NgModuleFactory} from './render3/ng_module_ref';

View File

@ -0,0 +1,11 @@
# Code Gen API
### Prefix ɵɵ
Ivy exports a number of functions prefixed with `ɵɵ`, for example `ɵɵelementStart`, or `ɵɵinject`, et al. These functions are part of API required for code generation by the Angular compiler. These functions are called by generated code, and they must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `ɵɵ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code.
### Guidance
- Do not use `ɵɵ` functions directly. They are meant to be used in generated code.
- Do not create new `ɵɵ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `ɵɵ` functions is a good pattern to follow.

View File

@ -1,9 +0,0 @@
# Delta Instructions
Ivy exports a number of functions prefixed with `Δ`, for example `ΔelementStart`, or `Δinject`, et al. These functions are referred to an "instructions" or "delta" instructions. They are functions that are called by code generated by the Ivy compiler that must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `Δ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code.
### Guidance
- Do not use `Δ` functions directly. They are meant to be used in generated code.
- Do not create new `Δ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `Δ` functions is a good pattern to follow.

View File

@ -10,8 +10,8 @@ We currently expect Ivy to remain behind the flag until it's feature complete an
The work can be divided into three categories:
- `@angular/compiler-cli`: TypeScript transformer pipeline which includes two command line tools:
- `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ΔdefineComponent` (and friends).
- `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ΔdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module.
- `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ɵɵdefineComponent` (and friends).
- `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ɵɵdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module.
- `@angular/compiler`: Ivy Compiler which converts decorator into ivy
- `@angular/core`: Decorators which can be patched with `@angular/compiler`.
@ -20,7 +20,7 @@ The work can be divided into three categories:
### `ngtsc` TSC compiler transformer
TSC transformer which removes and converts `@Pipe`, `@Component`, `@Directive` and `@NgModule`
to the corresponding `ΔdefinePipe`, `ΔdefineComponent`, `ΔdefineDirective` and `ΔdefineInjector`.
to the corresponding `ɵɵdefinePipe`, `ɵɵdefineComponent`, `ɵɵdefineDirective` and `ɵɵdefineInjector`.
- ✅ Basic setup of the transformer into `tsc`
- ✅ Can read STORING_METADATA_IN_D.TS from `.d.ts` (see: [STORING_METADATA_IN_D.TS.md](./STORING_METADATA_IN_D.TS.md))
@ -40,19 +40,19 @@ A tool which "upgrades" `node_module` compiled with non-ivy `ngc` into ivy compl
## `@angular/compiler` changes
- ✅ Component compilation: Translates `@Component` => `ΔdefineComponent`
- ✅ Component compilation: Translates `@Component` => `ɵɵdefineComponent`
-`TemplateCompiler` (current known as `ViewCompiler`)
-`StyleCompiler`
-`PipeCompiler`: Translates `@Pipe` => `ΔdefinePipe`
-`DirectiveCompiler`: Translates `@Directive` => `ΔdefineDirective`
-`InjectableCompiler`: Translates `@Injectable` => `ΔdefineInjectable`
-`NgModuleCompiler`: Translates `@NgModule` => `ΔdefineInjector` (and `ΔdefineNgModule` only in jit)
-`PipeCompiler`: Translates `@Pipe` => `ɵɵdefinePipe`
-`DirectiveCompiler`: Translates `@Directive` => `ɵɵdefineDirective`
-`InjectableCompiler`: Translates `@Injectable` => `ɵɵdefineInjectable`
-`NgModuleCompiler`: Translates `@NgModule` => `ɵɵdefineInjector` (and `ɵɵdefineNgModule` only in jit)
- ❌ Documentation
## `@angular/core` changes
The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ΔdefineComponent`.
The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ɵɵdefineComponent`.
-`@angular/compiler` can patch itself onto:
-`@Injectable`
@ -70,13 +70,13 @@ The goal is for the `@Component` (and friends) to be the compiler of template. S
## Decorators
| Annotation | `defineXXX()` | Run time | Spec | Compiler |
| -------------------- | ------------------------------ | ------- | -------- | -------- |
| `@Component` | ✅ `ΔdefineComponent()` | ✅ | ✅ | ✅ |
| `@Directive` | ✅ `ΔdefineDirective()` | ✅ | ✅ | ✅ |
| `@Directive` | ✅ `ΔdefineBase()` | ✅ | ✅ | ✅ |
| `@Pipe` | ✅ `ΔdefinePipe()` | ✅ | ✅ | ✅ |
| `@Injectable` | ✅ `ΔdefineInjectable()` | ✅ | ✅ | ✅ |
| `@NgModule` | ✅ `ΔdefineInjector()` | ✅ | ✅ | ✅ |
| `@ConfigureInjector` | ✅ `ΔdefineInjector()` | ❌ | ❌ | ❌ |
| `@Component` | ✅ `ɵɵdefineComponent()` | ✅ | ✅ | ✅ |
| `@Directive` | ✅ `ɵɵdefineDirective()` | ✅ | ✅ | ✅ |
| `@Directive` | ✅ `ɵɵdefineBase()` | ✅ | ✅ | ✅ |
| `@Pipe` | ✅ `ɵɵdefinePipe()` | ✅ | ✅ | ✅ |
| `@Injectable` | ✅ `ɵɵdefineInjectable()` | ✅ | ✅ | ✅ |
| `@NgModule` | ✅ `ɵɵdefineInjector()` | ✅ | ✅ | ✅ |
| `@ConfigureInjector` | ✅ `ɵɵdefineInjector()` | ❌ | ❌ | ❌ |

View File

@ -13,7 +13,7 @@ Here is an abbreviated example of breakage of tree-shake-ability.
})
export class TooltipDirective {
// ngtsc generates this:
static ngDirectiveDef = ΔdefineDirective(...);
static ngDirectiveDef = ɵɵdefineDirective(...);
}
@Component({
@ -22,7 +22,7 @@ export class TooltipDirective {
})
class MyAppComponent {
// ngtsc generates this:
static ngDirectiveDef = ΔdefineComponent({
static ngDirectiveDef = ɵɵdefineComponent({
...
directives: [
// BREAKS TREE-SHAKING!!!
@ -41,7 +41,7 @@ class MyAppComponent {
})
class MyAppModule {
// ngtsc generates this:
static ngDirectiveDef = ΔdefineNgModule(...);
static ngDirectiveDef = ɵɵdefineNgModule(...);
}
```

View File

@ -36,18 +36,18 @@ The size of the `CONSTS` section is declared in the property `consts` of the com
})
class MyApp {
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...,
consts: 5,
template: function(rf: RenderFlags, ctx: MyApp) {
if (rf & RenderFlags.Create) {
ΔelementStart(0, 'div');
Δtext(1, 'Hello ');
ΔelementStart(2, 'b');
Δtext(3, 'World');
ΔelementEnd();
Δtext(4, '!');
ΔelementEnd();
ɵɵelementStart(0, 'div');
ɵɵtext(1, 'Hello ');
ɵɵelementStart(2, 'b');
ɵɵtext(3, 'World');
ɵɵelementEnd();
ɵɵtext(4, '!');
ɵɵelementEnd();
}
...
}
@ -87,19 +87,19 @@ The size of the `VARS `section is declared in the property `vars` of the compone
class MyApp {
name = 'World';
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...,
consts: 2, // Two DOM Elements.
vars: 2, // Two bindings.
template: function(rf: RenderFlags, ctx: MyApp) {
if (rf & RenderFlags.Create) {
ΔelementStart(0, 'div');
Δtext(1);
ΔelementEnd();
ɵɵelementStart(0, 'div');
ɵɵtext(1);
ɵɵelementEnd();
}
if (rf & RenderFlags.Update) {
ΔelementProperty(0, 'title', Δbind(ctx.name));
ΔtextBinding(1, Δinterpolation1('Hello ', ctx.name, '!'));
ɵɵelementProperty(0, 'title', ɵɵbind(ctx.name));
ɵɵtextBinding(1, ɵɵinterpolation1('Hello ', ctx.name, '!'));
}
...
}
@ -139,12 +139,12 @@ Examples include:
})
class MyApp {
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...,
consts: 1,
template: function(rf: RenderFlags, ctx: MyApp) {
if (rf & RenderFlags.Create) {
Δelement(0, 'child', ['tooltip', null]);
ɵɵelement(0, 'child', ['tooltip', null]);
}
...
},
@ -159,7 +159,7 @@ class MyApp {
})
class Child {
@HostBinding('tooltip') hostTitle = 'Hello World!';
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...
hostVars: 1
});
@ -171,7 +171,7 @@ class Child {
})
class Tooltip {
@HostBinding('title') hostTitle = 'greeting';
static ngDirectiveDef = ΔdefineDirective({
static ngDirectiveDef = ɵɵdefineDirective({
...
hostVars: 1
});
@ -273,12 +273,12 @@ Injection tokens are sorted into three sections:
})
class MyApp {
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...,
consts: 1,
template: function(rf: RenderFlags, ctx: MyApp) {
if (rf & RenderFlags.Create) {
Δelement(0, 'child');
ɵɵelement(0, 'child');
}
...
},
@ -301,7 +301,7 @@ class MyApp {
})
class Child {
construction(injector: Injector) {}
static ngComponentDef = ΔdefineComponent({
static ngComponentDef = ɵɵdefineComponent({
...
features: [
ProvidesFeature(

View File

@ -9,7 +9,7 @@
import {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';
import {InjectionToken} from '../di/injection_token';
import {Injector} from '../di/injector';
import {Δinject} from '../di/injector_compatibility';
import {ɵɵinject} from '../di/injector_compatibility';
import {InjectFlags} from '../di/interface/injector';
import {Type} from '../interface/type';
import {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';
@ -66,7 +66,7 @@ function toRefArray(map: {[key: string]: string}): {propName: string; templateNa
*/
export const ROOT_CONTEXT = new InjectionToken<RootContext>(
'ROOT_CONTEXT_TOKEN',
{providedIn: 'root', factory: () => createRootContext(Δinject(SCHEDULER))});
{providedIn: 'root', factory: () => createRootContext(ɵɵinject(SCHEDULER))});
/**
* A change detection scheduler token for {@link RootContext}. This token is the default value used

View File

@ -18,7 +18,7 @@ import {stringify} from '../util/stringify';
import {EMPTY_ARRAY, EMPTY_OBJ} from './empty';
import {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';
import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ΔBaseDef} from './interfaces/definition';
import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ɵɵBaseDef} from './interfaces/definition';
// while SelectorFlags is unused here, it's required so that types don't get resolved lazily
// see: https://github.com/Microsoft/web-build-tools/issues/1050
import {CssSelectorList, SelectorFlags} from './interfaces/projection';
@ -41,7 +41,7 @@ let _renderCompCount = 0;
* ```
* @codeGenApi
*/
export function ΔdefineComponent<T>(componentDefinition: {
export function ɵɵdefineComponent<T>(componentDefinition: {
/**
* Directive type, needed to configure the injector.
*/
@ -307,7 +307,7 @@ export function ΔdefineComponent<T>(componentDefinition: {
/**
* @codeGenApi
*/
export function ΔsetComponentScope(
export function ɵɵsetComponentScope(
type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {
const def = (type.ngComponentDef as ComponentDef<any>);
def.directiveDefs = () => directives.map(extractDirectiveDef);
@ -334,7 +334,7 @@ export function extractPipeDef(type: PipeType<any>): PipeDef<any> {
/**
* @codeGenApi
*/
export function ΔdefineNgModule<T>(def: {
export function ɵɵdefineNgModule<T>(def: {
/** Token representing the module. Used by DI. */
type: T;
@ -378,7 +378,7 @@ export function ΔdefineNgModule<T>(def: {
*
* @codeGenApi
*/
export function ΔsetNgModuleScope(type: any, scope: {
export function ɵɵsetNgModuleScope(type: any, scope: {
/** List of components, directives, and pipes declared by this module. */
declarations?: Type<any>[] | (() => Type<any>[]);
@ -480,7 +480,7 @@ function invertObject<T>(
* # Example
* ```ts
* class ShouldBeInherited {
* static ngBaseDef = ΔdefineBase({
* static ngBaseDef = ɵɵdefineBase({
* ...
* })
* }
@ -490,7 +490,7 @@ function invertObject<T>(
*
* @codeGenApi
*/
export function ΔdefineBase<T>(baseDefinition: {
export function ɵɵdefineBase<T>(baseDefinition: {
/**
* A map of input names.
*
@ -547,7 +547,7 @@ export function ΔdefineBase<T>(baseDefinition: {
* of properties.
*/
outputs?: {[P in keyof T]?: string};
}): ΔBaseDef<T> {
}): ɵɵBaseDef<T> {
const declaredInputs: {[P in keyof T]: string} = {} as any;
return {
inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),
@ -564,7 +564,7 @@ export function ΔdefineBase<T>(baseDefinition: {
* class MyDirective {
* // Generated by Angular Template Compiler
* // [Symbol] syntax will not be supported by TypeScript until v2.7
* static ngDirectiveDef = ΔdefineDirective({
* static ngDirectiveDef = ɵɵdefineDirective({
* ...
* });
* }
@ -572,7 +572,7 @@ export function ΔdefineBase<T>(baseDefinition: {
*
* @codeGenApi
*/
export const ΔdefineDirective = ΔdefineComponent as any as<T>(directiveDefinition: {
export const ɵɵdefineDirective = ɵɵdefineComponent as any as<T>(directiveDefinition: {
/**
* Directive type, needed to configure the injector.
*/
@ -690,7 +690,7 @@ export const ΔdefineDirective = ΔdefineComponent as any as<T>(directiveDefinit
*
* @codeGenApi
*/
export function ΔdefinePipe<T>(pipeDef: {
export function ɵɵdefinePipe<T>(pipeDef: {
/** Name of the pipe. Used for matching pipes in template to pipe defs. */
name: string,

View File

@ -637,7 +637,7 @@ export class NodeInjector implements Injector {
/**
* @codeGenApi
*/
export function ΔgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
export function ɵɵgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
const typeAny = type as any;
const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||
getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);
@ -650,9 +650,9 @@ export function ΔgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)
/**
* @codeGenApi
*/
export function ΔgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {
export function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {
const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;
const factory = ΔgetFactoryOf<T>(proto);
const factory = ɵɵgetFactoryOf<T>(proto);
if (factory !== null) {
return factory;
} else {

View File

@ -12,7 +12,7 @@ import {ClassProvider, Provider} from '../di/interface/provider';
import {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';
import {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';
import {ΔdirectiveInject} from './instructions/all';
import {ɵɵdirectiveInject} from './instructions/all';
import {DirectiveDef} from './interfaces/definition';
import {NodeInjectorFactory} from './interfaces/injector';
import {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';
@ -93,7 +93,7 @@ function resolveProvider(
if (isTypeProvider(provider) || !provider.multi) {
// Single provider case: the factory is created and pushed immediately
const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ΔdirectiveInject);
const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);
const existingFactoryIndex = indexOf(
token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,
endIndex);
@ -255,7 +255,7 @@ function multiFactory(
this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any,
index: number, isViewProvider: boolean, isComponent: boolean,
f: () => any): NodeInjectorFactory {
const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ΔdirectiveInject);
const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);
factory.multi = [];
factory.index = index;
factory.componentProviders = 0;

View File

@ -13,7 +13,7 @@ import {ComponentDef, DirectiveDef, DirectiveDefFeature, RenderFlags} from '../i
import {adjustActiveDirectiveSuperClassDepthPosition} from '../state';
import {isComponentDef} from '../util/view_utils';
import {ΔNgOnChangesFeature} from './ng_onchanges_feature';
import {ɵɵNgOnChangesFeature} from './ng_onchanges_feature';
function getSuperType(type: Type<any>): Type<any>&
{ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {
@ -26,7 +26,7 @@ function getSuperType(type: Type<any>): Type<any>&
*
* @codeGenApi
*/
export function ΔInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {
export function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {
let superType = getSuperType(definition.type);
while (superType) {
@ -161,7 +161,7 @@ export function ΔInheritDefinitionFeature(definition: DirectiveDef<any>| Compon
definition.onInit = definition.onInit || superPrototype.ngOnInit;
if (superPrototype.ngOnChanges) {
ΔNgOnChangesFeature()(definition);
ɵɵNgOnChangesFeature()(definition);
}
}
}

View File

@ -41,7 +41,7 @@ type OnChangesExpando = OnChanges & {
*
* @codeGenApi
*/
export function ΔNgOnChangesFeature<T>(): DirectiveDefFeature {
export function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {
// This option ensures that the ngOnChanges lifecycle hook will be inherited
// from superclasses (in InheritDefinitionFeature).
(NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;

View File

@ -39,7 +39,7 @@ import {DirectiveDef} from '../interfaces/definition';
*
* @codeGenApi
*/
export function ΔProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {
export function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {
return (definition: DirectiveDef<T>) => {
definition.providersResolver =
(def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {

View File

@ -16,7 +16,7 @@ import {assertDefined, assertEqual, assertGreaterThan} from '../util/assert';
import {attachPatchData} from './context_discovery';
import {attachI18nOpCodesDebug} from './debug';
import {ΔelementAttribute, Δload, ΔtextBinding} from './instructions/all';
import {ɵɵelementAttribute, ɵɵload, ɵɵtextBinding} from './instructions/all';
import {allocExpando, createNodeAtIndex} from './instructions/shared';
import {LContainer, NATIVE} from './interfaces/container';
import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';
@ -351,7 +351,7 @@ const parentIndexStack: number[] = [];
*
* @codeGenApi
*/
export function Δi18nStart(index: number, message: string, subTemplateIndex?: number): void {
export function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void {
const tView = getLView()[TVIEW];
ngDevMode && assertDefined(tView, `tView should be defined`);
i18nIndexStack[++i18nIndexStackPointer] = index;
@ -538,7 +538,7 @@ function appendI18nNode(tNode: TNode, parentTNode: TNode, previousTNode: TNode |
*
* @codeGenApi
*/
export function Δi18nPostprocess(
export function ɵɵi18nPostprocess(
message: string, replacements: {[key: string]: (string | string[])} = {}): string {
/**
* Step 1: resolve all multi-value placeholders like [<5B>#5<>|<7C>*1:1<><31>#2:1<>|<7C>#4:1<>]
@ -634,7 +634,7 @@ export function Δi18nPostprocess(
*
* @codeGenApi
*/
export function Δi18nEnd(): void {
export function ɵɵi18nEnd(): void {
const tView = getLView()[TVIEW];
ngDevMode && assertDefined(tView, `tView should be defined`);
i18nEndFirstPass(tView);
@ -742,7 +742,7 @@ function readCreateOpCodes(
const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;
const attrName = createOpCodes[++i] as string;
const attrValue = createOpCodes[++i] as string;
ΔelementAttribute(elementNodeIndex, attrName, attrValue);
ɵɵelementAttribute(elementNodeIndex, attrName, attrValue);
break;
default:
throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`);
@ -819,10 +819,10 @@ function readUpdateOpCodes(
case I18nUpdateOpCode.Attr:
const attrName = updateOpCodes[++j] as string;
const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;
ΔelementAttribute(nodeIndex, attrName, value, sanitizeFn);
ɵɵelementAttribute(nodeIndex, attrName, value, sanitizeFn);
break;
case I18nUpdateOpCode.Text:
ΔtextBinding(nodeIndex, value);
ɵɵtextBinding(nodeIndex, value);
break;
case I18nUpdateOpCode.IcuSwitch:
tIcuIndex = updateOpCodes[++j] as number;
@ -886,7 +886,7 @@ function removeNode(index: number, viewData: LView) {
nativeRemoveNode(viewData[RENDERER], removedPhRNode);
}
const slotValue = Δload(index) as RElement | RComment | LContainer | StylingContext;
const slotValue = ɵɵload(index) as RElement | RComment | LContainer | StylingContext;
if (isLContainer(slotValue)) {
const lContainer = slotValue as LContainer;
if (removedPhTNode.type !== TNodeType.Container) {
@ -923,9 +923,9 @@ function removeNode(index: number, viewData: LView) {
*
* @codeGenApi
*/
export function Δi18n(index: number, message: string, subTemplateIndex?: number): void {
Δi18nStart(index, message, subTemplateIndex);
Δi18nEnd();
export function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void {
ɵɵi18nStart(index, message, subTemplateIndex);
ɵɵi18nEnd();
}
/**
@ -936,7 +936,7 @@ export function Δi18n(index: number, message: string, subTemplateIndex?: number
*
* @codeGenApi
*/
export function Δi18nAttributes(index: number, values: string[]): void {
export function ɵɵi18nAttributes(index: number, values: string[]): void {
const tView = getLView()[TVIEW];
ngDevMode && assertDefined(tView, `tView should be defined`);
if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
@ -968,7 +968,7 @@ function i18nAttributesFirstPass(tView: TView, index: number, values: string[])
addAllToArray(
generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);
} else {
ΔelementAttribute(previousElementIndex, attrName, value);
ɵɵelementAttribute(previousElementIndex, attrName, value);
}
}
}
@ -988,7 +988,7 @@ let shiftsCounter = 0;
*
* @codeGenApi
*/
export function Δi18nExp<T>(expression: T | NO_CHANGE): void {
export function ɵɵi18nExp<T>(expression: T | NO_CHANGE): void {
if (expression !== NO_CHANGE) {
changeMask = changeMask | (1 << shiftsCounter);
}
@ -1003,7 +1003,7 @@ export function Δi18nExp<T>(expression: T | NO_CHANGE): void {
*
* @codeGenApi
*/
export function Δi18nApply(index: number) {
export function ɵɵi18nApply(index: number) {
if (shiftsCounter) {
const lView = getLView();
const tView = lView[TVIEW];
@ -1633,7 +1633,7 @@ const LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g;
* @publicApi
* @deprecated this method is temporary & should not be used as it will be removed soon
*/
export function Δi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) {
export function ɵɵi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) {
if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string
input = TRANSLATIONS[input];
}

View File

@ -6,109 +6,109 @@
* found in the LICENSE file at https://angular.io/license
*/
import {LifecycleHooksFeature, renderComponent, whenRendered} from './component';
import {ΔdefineBase, ΔdefineComponent, ΔdefineDirective, ΔdefineNgModule, ΔdefinePipe, ΔsetComponentScope, ΔsetNgModuleScope} from './definition';
import {ΔInheritDefinitionFeature} from './features/inherit_definition_feature';
import {ΔNgOnChangesFeature} from './features/ng_onchanges_feature';
import {ΔProvidersFeature} from './features/providers_feature';
import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ΔBaseDef, ΔComponentDefWithMeta, ΔDirectiveDefWithMeta, ΔPipeDefWithMeta} from './interfaces/definition';
import {ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition';
import {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';
import {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';
import {ɵɵProvidersFeature} from './features/providers_feature';
import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ɵɵBaseDef, ɵɵComponentDefWithMeta, ɵɵDirectiveDefWithMeta, ɵɵPipeDefWithMeta} from './interfaces/definition';
import {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';
export {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';
export {ΔgetFactoryOf, ΔgetInheritedFactory} from './di';
export {ɵɵgetFactoryOf, ɵɵgetInheritedFactory} from './di';
// clang-format off
export {
detectChanges,
markDirty,
store,
tick,
ΔallocHostVars,
Δbind,
ΔcomponentHostSyntheticListener,
ΔcomponentHostSyntheticProperty,
ɵɵallocHostVars,
ɵɵbind,
ɵɵcomponentHostSyntheticListener,
ɵɵcomponentHostSyntheticProperty,
Δcontainer,
ΔcontainerRefreshEnd,
ΔcontainerRefreshStart,
ɵɵcontainer,
ɵɵcontainerRefreshEnd,
ɵɵcontainerRefreshStart,
ΔdirectiveInject,
ɵɵdirectiveInject,
Δelement,
ΔelementAttribute,
ΔelementClassProp,
ΔelementContainerEnd,
ɵɵelement,
ɵɵelementAttribute,
ɵɵelementClassProp,
ɵɵelementContainerEnd,
ΔelementContainerStart,
ΔelementEnd,
ɵɵelementContainerStart,
ɵɵelementEnd,
ΔelementHostAttrs,
ΔelementHostClassProp,
ΔelementHostStyleProp,
ΔelementHostStyling,
ΔelementHostStylingApply,
ΔelementHostStylingMap,
ΔelementProperty,
ΔelementStart,
ΔelementStyleProp,
ΔelementStyling,
ΔelementStylingApply,
ΔelementStylingMap,
ΔembeddedViewEnd,
ɵɵelementHostAttrs,
ɵɵelementHostClassProp,
ɵɵelementHostStyleProp,
ɵɵelementHostStyling,
ɵɵelementHostStylingApply,
ɵɵelementHostStylingMap,
ɵɵelementProperty,
ɵɵelementStart,
ɵɵelementStyleProp,
ɵɵelementStyling,
ɵɵelementStylingApply,
ɵɵelementStylingMap,
ɵɵembeddedViewEnd,
ΔembeddedViewStart,
ɵɵembeddedViewStart,
ΔgetCurrentView,
ΔinjectAttribute,
ɵɵgetCurrentView,
ɵɵinjectAttribute,
Δinterpolation1,
Δinterpolation2,
Δinterpolation3,
Δinterpolation4,
Δinterpolation5,
Δinterpolation6,
Δinterpolation7,
Δinterpolation8,
ΔinterpolationV,
ɵɵinterpolation1,
ɵɵinterpolation2,
ɵɵinterpolation3,
ɵɵinterpolation4,
ɵɵinterpolation5,
ɵɵinterpolation6,
ɵɵinterpolation7,
ɵɵinterpolation8,
ɵɵinterpolationV,
Δlistener,
Δload,
ɵɵlistener,
ɵɵload,
ΔnamespaceHTML,
ΔnamespaceMathML,
ΔnamespaceSVG,
ɵɵnamespaceHTML,
ɵɵnamespaceMathML,
ɵɵnamespaceSVG,
ΔnextContext,
ɵɵnextContext,
Δprojection,
ΔprojectionDef,
Δproperty,
ɵɵprojection,
ɵɵprojectionDef,
ɵɵproperty,
Δreference,
ɵɵreference,
Δselect,
Δtemplate,
ɵɵselect,
ɵɵtemplate,
Δtext,
ΔtextBinding} from './instructions/all';
ɵɵtext,
ɵɵtextBinding} from './instructions/all';
export {RenderFlags} from './interfaces/definition';
export {CssSelectorList} from './interfaces/projection';
export {
ΔrestoreView,
ɵɵrestoreView,
ΔenableBindings,
ΔdisableBindings,
ɵɵenableBindings,
ɵɵdisableBindings,
} from './state';
export {
Δi18n,
Δi18nAttributes,
Δi18nExp,
Δi18nStart,
Δi18nEnd,
Δi18nApply,
Δi18nPostprocess,
ɵɵi18n,
ɵɵi18nAttributes,
ɵɵi18nExp,
ɵɵi18nStart,
ɵɵi18nEnd,
ɵɵi18nApply,
ɵɵi18nPostprocess,
i18nConfigureLocalize,
Δi18nLocalize,
ɵɵi18nLocalize,
} from './i18n';
export {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref';
@ -122,71 +122,71 @@ export {
} from './metadata';
export {
Δpipe,
ΔpipeBind1,
ΔpipeBind2,
ΔpipeBind3,
ΔpipeBind4,
ΔpipeBindV,
ɵɵpipe,
ɵɵpipeBind1,
ɵɵpipeBind2,
ɵɵpipeBind3,
ɵɵpipeBind4,
ɵɵpipeBindV,
} from './pipe';
export {
ΔqueryRefresh,
ΔviewQuery,
ΔstaticViewQuery,
ΔloadViewQuery,
ΔcontentQuery,
ΔloadContentQuery,
ΔstaticContentQuery
ɵɵqueryRefresh,
ɵɵviewQuery,
ɵɵstaticViewQuery,
ɵɵloadViewQuery,
ɵɵcontentQuery,
ɵɵloadContentQuery,
ɵɵstaticContentQuery
} from './query';
export {
ΔpureFunction0,
ΔpureFunction1,
ΔpureFunction2,
ΔpureFunction3,
ΔpureFunction4,
ΔpureFunction5,
ΔpureFunction6,
ΔpureFunction7,
ΔpureFunction8,
ΔpureFunctionV,
ɵɵpureFunction0,
ɵɵpureFunction1,
ɵɵpureFunction2,
ɵɵpureFunction3,
ɵɵpureFunction4,
ɵɵpureFunction5,
ɵɵpureFunction6,
ɵɵpureFunction7,
ɵɵpureFunction8,
ɵɵpureFunctionV,
} from './pure_function';
export {ΔtemplateRefExtractor} from './view_engine_compatibility_prebound';
export {ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound';
export {ΔresolveWindow, ΔresolveDocument, ΔresolveBody} from './util/misc_utils';
export {ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody} from './util/misc_utils';
// clang-format on
export {
ΔBaseDef,
ɵɵBaseDef,
ComponentDef,
ΔComponentDefWithMeta,
ɵɵComponentDefWithMeta,
ComponentTemplate,
ComponentType,
DirectiveDef,
DirectiveDefFlags,
ΔDirectiveDefWithMeta,
ɵɵDirectiveDefWithMeta,
DirectiveType,
ΔNgOnChangesFeature,
ΔInheritDefinitionFeature,
ΔProvidersFeature,
ɵɵNgOnChangesFeature,
ɵɵInheritDefinitionFeature,
ɵɵProvidersFeature,
PipeDef,
ΔPipeDefWithMeta,
ɵɵPipeDefWithMeta,
LifecycleHooksFeature,
ΔdefineComponent,
ΔdefineDirective,
ΔdefineNgModule,
ΔdefineBase,
ΔdefinePipe,
ɵɵdefineComponent,
ɵɵdefineDirective,
ɵɵdefineNgModule,
ɵɵdefineBase,
ɵɵdefinePipe,
getHostElement,
getComponent,
getDirectives,
getRenderedText,
renderComponent,
ΔsetComponentScope,
ΔsetNgModuleScope,
ɵɵsetComponentScope,
ɵɵsetNgModuleScope,
whenRendered,
};

View File

@ -19,7 +19,7 @@ import {NO_CHANGE} from '../tokens';
*
* @codeGenApi
*/
export function ΔallocHostVars(count: number): void {
export function ɵɵallocHostVars(count: number): void {
const lView = getLView();
const tView = lView[TVIEW];
if (!tView.firstTemplatePass) return;

View File

@ -30,7 +30,7 @@ import {addToViewTree, createDirectivesAndLocals, createLContainer, createNodeAt
*
* @codeGenApi
*/
export function Δcontainer(index: number): void {
export function ɵɵcontainer(index: number): void {
const tNode = containerInternal(index, null, null);
const lView = getLView();
if (lView[TVIEW].firstTemplatePass) {
@ -59,7 +59,7 @@ export function Δcontainer(index: number): void {
*
* @codeGenApi
*/
export function Δtemplate(
export function ɵɵtemplate(
index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,
tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,
localRefExtractor?: LocalRefExtractor) {
@ -87,7 +87,7 @@ export function Δtemplate(
*
* @codeGenApi
*/
export function ΔcontainerRefreshStart(index: number): void {
export function ɵɵcontainerRefreshStart(index: number): void {
const lView = getLView();
const tView = lView[TVIEW];
let previousOrParentTNode = loadInternal(tView.data, index) as TNode;
@ -110,7 +110,7 @@ export function ΔcontainerRefreshStart(index: number): void {
*
* @codeGenApi
*/
export function ΔcontainerRefreshEnd(): void {
export function ɵɵcontainerRefreshEnd(): void {
let previousOrParentTNode = getPreviousOrParentTNode();
if (getIsParent()) {
setIsParent(false);

View File

@ -23,9 +23,9 @@ import {getLView, getPreviousOrParentTNode} from '../state';
* class SomeDirective {
* constructor(directive: DirectiveA) {}
*
* static ngDirectiveDef = ΔdefineDirective({
* static ngDirectiveDef = ɵɵdefineDirective({
* type: SomeDirective,
* factory: () => new SomeDirective(ΔdirectiveInject(DirectiveA))
* factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
* });
* }
* ```
@ -35,9 +35,9 @@ import {getLView, getPreviousOrParentTNode} from '../state';
*
* @codeGenApi
*/
export function ΔdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;
export function ΔdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;
export function ΔdirectiveInject<T>(
export function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;
export function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;
export function ɵɵdirectiveInject<T>(
token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {
token = resolveForwardRef(token);
return getOrCreateInjectable<T>(
@ -50,6 +50,6 @@ export function ΔdirectiveInject<T>(
*
* @codeGenApi
*/
export function ΔinjectAttribute(attrNameToInject: string): string|null {
export function ɵɵinjectAttribute(attrNameToInject: string): string|null {
return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);
}

View File

@ -44,7 +44,7 @@ import {getActiveDirectiveStylingIndex} from './styling';
*
* @codeGenApi
*/
export function ΔelementStart(
export function ɵɵelementStart(
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
const lView = getLView();
const tView = lView[TVIEW];
@ -129,7 +129,7 @@ export function ΔelementStart(
*
* @codeGenApi
*/
export function ΔelementEnd(): void {
export function ɵɵelementEnd(): void {
let previousOrParentTNode = getPreviousOrParentTNode();
if (getIsParent()) {
setIsParent(false);
@ -181,10 +181,10 @@ export function ΔelementEnd(): void {
*
* @codeGenApi
*/
export function Δelement(
export function ɵɵelement(
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
ΔelementStart(index, name, attrs, localRefs);
ΔelementEnd();
ɵɵelementStart(index, name, attrs, localRefs);
ɵɵelementEnd();
}
@ -200,7 +200,7 @@ export function Δelement(
*
* @codeGenApi
*/
export function ΔelementAttribute(
export function ɵɵelementAttribute(
index: number, name: string, value: any, sanitizer?: SanitizerFn | null,
namespace?: string): void {
if (value !== NO_CHANGE) {
@ -268,7 +268,7 @@ export function ΔelementAttribute(
*
* @codeGenApi
*/
export function ΔelementHostAttrs(attrs: TAttributes) {
export function ɵɵelementHostAttrs(attrs: TAttributes) {
const hostElementIndex = getSelectedIndex();
const lView = getLView();
const tNode = getTNode(hostElementIndex, lView);

View File

@ -31,7 +31,7 @@ import {createDirectivesAndLocals, createNodeAtIndex, executeContentQueries, set
*
* @codeGenApi
*/
export function ΔelementContainerStart(
export function ɵɵelementContainerStart(
index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {
const lView = getLView();
const tView = lView[TVIEW];
@ -72,7 +72,7 @@ export function ΔelementContainerStart(
*
* @codeGenApi
*/
export function ΔelementContainerEnd(): void {
export function ɵɵelementContainerEnd(): void {
let previousOrParentTNode = getPreviousOrParentTNode();
const lView = getLView();
const tView = lView[TVIEW];

View File

@ -26,7 +26,8 @@ import {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews
*
* @codeGenApi
*/
export function ΔembeddedViewStart(viewBlockId: number, consts: number, vars: number): RenderFlags {
export function ɵɵembeddedViewStart(
viewBlockId: number, consts: number, vars: number): RenderFlags {
const lView = getLView();
const previousOrParentTNode = getPreviousOrParentTNode();
// The previous node can be a view node if we are processing an inline for loop
@ -129,7 +130,7 @@ function scanForView(lContainer: LContainer, startIdx: number, viewBlockId: numb
*
* @codeGenApi
*/
export function ΔembeddedViewEnd(): void {
export function ɵɵembeddedViewEnd(): void {
const lView = getLView();
const viewHost = lView[T_HOST];

View File

@ -17,6 +17,6 @@ import {getLView} from '../state';
*
* @codeGenApi
*/
export function ΔgetCurrentView(): OpaqueViewState {
export function ɵɵgetCurrentView(): OpaqueViewState {
return getLView() as any as OpaqueViewState;
}

View File

@ -31,7 +31,7 @@ import {BindingDirection, generatePropertyAliases, getCleanup, handleError, load
*
* @codeGenApi
*/
export function Δlistener(
export function ɵɵlistener(
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
eventTargetResolver?: GlobalTargetResolver): void {
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);
@ -58,7 +58,7 @@ export function Δlistener(
*
* @codeGenApi
*/
export function ΔcomponentHostSyntheticListener<T>(
export function ɵɵcomponentHostSyntheticListener<T>(
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
eventTargetResolver?: GlobalTargetResolver): void {
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);

View File

@ -6,4 +6,4 @@
* found in the LICENSE file at https://angular.io/license
*/
export {ΔnamespaceHTML, ΔnamespaceMathML, ΔnamespaceSVG} from '../state';
export {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state';

View File

@ -19,6 +19,6 @@ import {nextContextImpl} from '../state';
*
* @codeGenApi
*/
export function ΔnextContext<T = any>(level: number = 1): T {
export function ɵɵnextContext<T = any>(level: number = 1): T {
return nextContextImpl(level);
}

View File

@ -39,7 +39,7 @@ import {createNodeAtIndex} from './shared';
*
* @codeGenApi
*/
export function ΔprojectionDef(selectors?: CssSelectorList[]): void {
export function ɵɵprojectionDef(selectors?: CssSelectorList[]): void {
const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;
if (!componentNode.projection) {
@ -78,7 +78,7 @@ export function ΔprojectionDef(selectors?: CssSelectorList[]): void {
*
* @codeGenApi
*/
export function Δprojection(
export function ɵɵprojection(
nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {
const lView = getLView();
const tProjectionNode =

View File

@ -34,13 +34,13 @@ import {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer, storeB
*
* @codeGenApi
*/
export function Δproperty<T>(
export function ɵɵproperty<T>(
propName: string, value: T, sanitizer?: SanitizerFn | null,
nativeOnly?: boolean): TsickleIssue1009 {
const index = getSelectedIndex();
const bindReconciledValue = Δbind(value);
const bindReconciledValue = ɵɵbind(value);
elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);
return Δproperty;
return ɵɵproperty;
}
/**
@ -50,7 +50,7 @@ export function Δproperty<T>(
*
* @codeGenApi
*/
export function Δbind<T>(value: T): T|NO_CHANGE {
export function ɵɵbind<T>(value: T): T|NO_CHANGE {
const lView = getLView();
const bindingIndex = lView[BINDING_INDEX]++;
storeBindingMetadata(lView);
@ -75,7 +75,7 @@ export function Δbind<T>(value: T): T|NO_CHANGE {
*
* @codeGenApi
*/
export function ΔelementProperty<T>(
export function ɵɵelementProperty<T>(
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
nativeOnly?: boolean): void {
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);
@ -104,7 +104,7 @@ export function ΔelementProperty<T>(
*
* @codeGenApi
*/
export function ΔcomponentHostSyntheticProperty<T>(
export function ɵɵcomponentHostSyntheticProperty<T>(
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
nativeOnly?: boolean) {
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadComponentRenderer);

View File

@ -29,7 +29,7 @@ import {TsickleIssue1009, elementPropertyInternal, storeBindingMetadata} from '.
*
* @codeGenApi
*/
export function ΔinterpolationV(values: any[]): string|NO_CHANGE {
export function ɵɵinterpolationV(values: any[]): string|NO_CHANGE {
ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
let different = false;
@ -74,7 +74,7 @@ export function ΔinterpolationV(values: any[]): string|NO_CHANGE {
*
* @codeGenApi
*/
export function Δinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {
export function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {
const lView = getLView();
const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);
storeBindingMetadata(lView, prefix, suffix);
@ -86,7 +86,7 @@ export function Δinterpolation1(prefix: string, v0: any, suffix: string): strin
*
* @codeGenApi
*/
export function Δinterpolation2(
export function ɵɵinterpolation2(
prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {
const lView = getLView();
const bindingIndex = lView[BINDING_INDEX];
@ -107,7 +107,7 @@ export function Δinterpolation2(
*
* @codeGenApi
*/
export function Δinterpolation3(
export function ɵɵinterpolation3(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string|
NO_CHANGE {
const lView = getLView();
@ -133,7 +133,7 @@ export function Δinterpolation3(
*
* @codeGenApi
*/
export function Δinterpolation4(
export function ɵɵinterpolation4(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
suffix: string): string|NO_CHANGE {
const lView = getLView();
@ -161,7 +161,7 @@ export function Δinterpolation4(
*
* @codeGenApi
*/
export function Δinterpolation5(
export function ɵɵinterpolation5(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
i3: string, v4: any, suffix: string): string|NO_CHANGE {
const lView = getLView();
@ -191,7 +191,7 @@ export function Δinterpolation5(
*
* @codeGenApi
*/
export function Δinterpolation6(
export function ɵɵinterpolation6(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {
const lView = getLView();
@ -222,7 +222,7 @@ export function Δinterpolation6(
*
* @codeGenApi
*/
export function Δinterpolation7(
export function ɵɵinterpolation7(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|
NO_CHANGE {
@ -256,7 +256,7 @@ export function Δinterpolation7(
*
* @codeGenApi
*/
export function Δinterpolation8(
export function ɵɵinterpolation8(
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
suffix: string): string|NO_CHANGE {
@ -292,7 +292,7 @@ export function Δinterpolation8(
/**
* Shared reference to a string, used in `ΔpropertyInterpolate`.
* Shared reference to a string, used in `ɵɵpropertyInterpolate`.
*/
const EMPTY_STRING = '';
@ -310,7 +310,7 @@ const EMPTY_STRING = '';
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate('title', v0);
* ɵɵpropertyInterpolate('title', v0);
* ```
*
* If the property name also exists as an input property on one of the element's directives,
@ -323,9 +323,9 @@ const EMPTY_STRING = '';
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 {
ΔpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING);
return ΔpropertyInterpolate;
export function ɵɵpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 {
ɵɵpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING);
return ɵɵpropertyInterpolate;
}
@ -342,7 +342,7 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate1('title', 'prefix', v0, 'suffix');
* ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
* ```
*
* If the property name also exists as an input property on one of the element's directives,
@ -355,11 +355,11 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate1(
export function ɵɵpropertyInterpolate1(
propName: string, prefix: string, v0: any, suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(index, propName, Δinterpolation1(prefix, v0, suffix));
return ΔpropertyInterpolate1;
elementPropertyInternal(index, propName, ɵɵinterpolation1(prefix, v0, suffix));
return ɵɵpropertyInterpolate1;
}
/**
@ -375,7 +375,7 @@ export function ΔpropertyInterpolate1(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
* ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
* ```
*
* If the property name also exists as an input property on one of the element's directives,
@ -390,12 +390,12 @@ export function ΔpropertyInterpolate1(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate2(
export function ɵɵpropertyInterpolate2(
propName: string, prefix: string, v0: any, i0: string, v1: any,
suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(index, propName, Δinterpolation2(prefix, v0, i0, v1, suffix));
return ΔpropertyInterpolate2;
elementPropertyInternal(index, propName, ɵɵinterpolation2(prefix, v0, i0, v1, suffix));
return ɵɵpropertyInterpolate2;
}
/**
@ -411,7 +411,7 @@ export function ΔpropertyInterpolate2(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate3(
* ɵɵpropertyInterpolate3(
* 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
* ```
*
@ -429,12 +429,12 @@ export function ΔpropertyInterpolate2(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate3(
export function ɵɵpropertyInterpolate3(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,
suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(index, propName, Δinterpolation3(prefix, v0, i0, v1, i1, v2, suffix));
return ΔpropertyInterpolate3;
elementPropertyInternal(index, propName, ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix));
return ɵɵpropertyInterpolate3;
}
/**
@ -450,7 +450,7 @@ export function ΔpropertyInterpolate3(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate4(
* ɵɵpropertyInterpolate4(
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
* ```
*
@ -470,13 +470,13 @@ export function ΔpropertyInterpolate3(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate4(
export function ɵɵpropertyInterpolate4(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
v3: any, suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(
index, propName, Δinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix));
return ΔpropertyInterpolate4;
index, propName, ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix));
return ɵɵpropertyInterpolate4;
}
/**
@ -492,7 +492,7 @@ export function ΔpropertyInterpolate4(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate5(
* ɵɵpropertyInterpolate5(
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
* ```
*
@ -514,13 +514,13 @@ export function ΔpropertyInterpolate4(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate5(
export function ɵɵpropertyInterpolate5(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
v3: any, i3: string, v4: any, suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(
index, propName, Δinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix));
return ΔpropertyInterpolate5;
index, propName, ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix));
return ɵɵpropertyInterpolate5;
}
/**
@ -536,7 +536,7 @@ export function ΔpropertyInterpolate5(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate6(
* ɵɵpropertyInterpolate6(
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
* ```
*
@ -560,13 +560,14 @@ export function ΔpropertyInterpolate5(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate6(
export function ɵɵpropertyInterpolate6(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(
index, propName, Δinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix));
return ΔpropertyInterpolate6;
index, propName,
ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix));
return ɵɵpropertyInterpolate6;
}
/**
@ -582,7 +583,7 @@ export function ΔpropertyInterpolate6(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate7(
* ɵɵpropertyInterpolate7(
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
* ```
*
@ -608,15 +609,15 @@ export function ΔpropertyInterpolate6(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate7(
export function ɵɵpropertyInterpolate7(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,
suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(
index, propName,
Δinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix));
return ΔpropertyInterpolate7;
ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix));
return ɵɵpropertyInterpolate7;
}
/**
@ -632,7 +633,7 @@ export function ΔpropertyInterpolate7(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolate8(
* ɵɵpropertyInterpolate8(
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
* ```
*
@ -660,15 +661,15 @@ export function ΔpropertyInterpolate7(
* @param suffix Static value used for concatenation only.
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolate8(
export function ɵɵpropertyInterpolate8(
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
suffix: string): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(
index, propName,
Δinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix));
return ΔpropertyInterpolate8;
ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix));
return ɵɵpropertyInterpolate8;
}
/**
@ -684,7 +685,7 @@ export function ΔpropertyInterpolate8(
* Its compiled representation is::
*
* ```ts
* ΔpropertyInterpolateV(
* ɵɵpropertyInterpolateV(
* 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
* 'suffix']);
* ```
@ -699,9 +700,9 @@ export function ΔpropertyInterpolate8(
* (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
* @returns itself, so that it may be chained.
*/
export function ΔpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 {
export function ɵɵpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 {
const index = getSelectedIndex();
elementPropertyInternal(index, propName, ΔinterpolationV(values));
return ΔpropertyInterpolateV;
elementPropertyInternal(index, propName, ɵɵinterpolationV(values));
return ɵɵpropertyInterpolateV;
}

View File

@ -31,7 +31,7 @@ import {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state';
*
* @codeGenApi
*/
export function Δselect(index: number): void {
export function ɵɵselect(index: number): void {
ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
ngDevMode &&
assertLessThan(

View File

@ -30,7 +30,7 @@ import {StylingContext} from '../interfaces/styling';
import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';
import {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';
import {isNodeMatchingSelectorList} from '../node_selector_matcher';
import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ΔnamespaceHTML} from '../state';
import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ɵɵnamespaceHTML} from '../state';
import {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings';
import {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util';
import {NO_CHANGE} from '../tokens';
@ -431,7 +431,7 @@ export function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, con
oldView = enterView(viewToRender, viewToRender[T_HOST]);
resetPreOrderHookFlags(viewToRender);
ΔnamespaceHTML();
ɵɵnamespaceHTML();
// Reset the selected index so we can assert that `select` was called later
setSelectedIndex(-1);
@ -466,7 +466,7 @@ function renderComponentOrTemplate<T>(
if (creationModeIsActive) {
// creation mode pass
if (templateFn) {
ΔnamespaceHTML();
ɵɵnamespaceHTML();
// Reset the selected index so we can assert that `select` was called later
setSelectedIndex(-1);
@ -1672,7 +1672,7 @@ export function checkView<T>(hostView: LView, component: T) {
try {
resetPreOrderHookFlags(hostView);
ΔnamespaceHTML();
ɵɵnamespaceHTML();
creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);
// Reset the selected index so we can assert that `select` was called later

View File

@ -33,7 +33,7 @@ export function store<T>(index: number, value: T): void {
*
* @codeGenApi
*/
export function Δreference<T>(index: number) {
export function ɵɵreference<T>(index: number) {
const contextLView = getContextLView();
return loadInternal<T>(contextLView, index);
}
@ -43,6 +43,6 @@ export function Δreference<T>(index: number) {
*
* @codeGenApi
*/
export function Δload<T>(index: number): T {
export function ɵɵload<T>(index: number): T {
return loadInternal<T>(getLView(), index);
}

View File

@ -64,7 +64,7 @@ import {scheduleTick, setInputsForProperty} from './shared';
*
* @codeGenApi
*/
export function ΔelementStyling(
export function ɵɵelementStyling(
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
styleSanitizer?: StyleSanitizeFn | null): void {
const tNode = getPreviousOrParentTNode();
@ -106,7 +106,7 @@ export function ΔelementStyling(
*
* @codeGenApi
*/
export function ΔelementHostStyling(
export function ɵɵelementHostStyling(
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
styleSanitizer?: StyleSanitizeFn | null): void {
const tNode = getPreviousOrParentTNode();
@ -166,7 +166,7 @@ function initElementStyling(
*
* @codeGenApi
*/
export function ΔelementStyleProp(
export function ɵɵelementStyleProp(
index: number, styleIndex: number, value: string | number | String | PlayerFactory | null,
suffix?: string | null, forceOverride?: boolean): void {
const valueToAdd = resolveStylePropValue(value, suffix);
@ -200,7 +200,7 @@ export function ΔelementStyleProp(
*
* @codeGenApi
*/
export function ΔelementHostStyleProp(
export function ɵɵelementHostStyleProp(
styleIndex: number, value: string | number | String | PlayerFactory | null,
suffix?: string | null, forceOverride?: boolean): void {
const directiveStylingIndex = getActiveDirectiveStylingIndex();
@ -253,7 +253,7 @@ function resolveStylePropValue(
*
* @codeGenApi
*/
export function ΔelementClassProp(
export function ɵɵelementClassProp(
index: number, classIndex: number, value: boolean | PlayerFactory,
forceOverride?: boolean): void {
const input = (value instanceof BoundPlayerFactory) ?
@ -283,7 +283,7 @@ export function ΔelementClassProp(
*
* @codeGenApi
*/
export function ΔelementHostClassProp(
export function ɵɵelementHostClassProp(
classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void {
const directiveStylingIndex = getActiveDirectiveStylingIndex();
const hostElementIndex = getSelectedIndex();
@ -326,7 +326,7 @@ function booleanOrNull(value: any): boolean|null {
*
* @codeGenApi
*/
export function ΔelementStylingMap(
export function ɵɵelementStylingMap(
index: number, classes: {[key: string]: any} | string | NO_CHANGE | null,
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
const lView = getLView();
@ -379,7 +379,7 @@ export function ΔelementStylingMap(
*
* @codeGenApi
*/
export function ΔelementHostStylingMap(
export function ɵɵelementHostStylingMap(
classes: {[key: string]: any} | string | NO_CHANGE | null,
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
const directiveStylingIndex = getActiveDirectiveStylingIndex();
@ -405,7 +405,7 @@ export function ΔelementHostStylingMap(
*
* @codeGenApi
*/
export function ΔelementStylingApply(index: number): void {
export function ɵɵelementStylingApply(index: number): void {
elementStylingApplyInternal(DEFAULT_TEMPLATE_DIRECTIVE_INDEX, index);
}
@ -419,7 +419,7 @@ export function ΔelementStylingApply(index: number): void {
*
* @codeGenApi
*/
export function ΔelementHostStylingApply(): void {
export function ɵɵelementHostStylingApply(): void {
elementStylingApplyInternal(getActiveDirectiveStylingIndex(), getSelectedIndex());
}

View File

@ -24,7 +24,7 @@ import {createNodeAtIndex} from './shared';
*
* @codeGenApi
*/
export function Δtext(index: number, value?: any): void {
export function ɵɵtext(index: number, value?: any): void {
const lView = getLView();
ngDevMode && assertEqual(
lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,
@ -47,7 +47,7 @@ export function Δtext(index: number, value?: any): void {
*
* @codeGenApi
*/
export function ΔtextBinding<T>(index: number, value: T | NO_CHANGE): void {
export function ɵɵtextBinding<T>(index: number, value: T | NO_CHANGE): void {
if (value !== NO_CHANGE) {
const lView = getLView();
ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);

View File

@ -88,7 +88,7 @@ export interface PipeType<T> extends Type<T> { ngPipeDef: never; }
/**
* @codeGenApi
*/
export type ΔDirectiveDefWithMeta<
export type ɵɵDirectiveDefWithMeta<
T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string},
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef<T>;
@ -103,7 +103,7 @@ export type ΔDirectiveDefWithMeta<
*
* @codeGenApi
*/
export interface ΔBaseDef<T> {
export interface ɵɵBaseDef<T> {
/**
* A dictionary mapping the inputs' minified property names to their public API names, which
* are their aliases if any, or their original unminified property names
@ -139,7 +139,7 @@ export interface ΔBaseDef<T> {
*
* See: {@link defineDirective}
*/
export interface DirectiveDef<T> extends ΔBaseDef<T> {
export interface DirectiveDef<T> extends ɵɵBaseDef<T> {
/** Token representing the directive. Used by DI. */
type: Type<T>;
@ -202,7 +202,7 @@ export interface DirectiveDef<T> extends ΔBaseDef<T> {
/**
* @codeGenApi
*/
export type ΔComponentDefWithMeta<
export type ɵɵComponentDefWithMeta<
T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string},
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef<T>;
@ -349,7 +349,7 @@ export interface PipeDef<T> {
/**
* @codeGenApi
*/
export type ΔPipeDefWithMeta<T, Name extends string> = PipeDef<T>;
export type ɵɵPipeDefWithMeta<T, Name extends string> = PipeDef<T>;
export interface DirectiveDefFeature {
<T>(directiveDef: DirectiveDef<T>): void;

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ΔdefineInjectable, ΔdefineInjector,} from '../../di/interface/defs';
import {Δinject} from '../../di/injector_compatibility';
import {ɵɵdefineInjectable, ɵɵdefineInjector,} from '../../di/interface/defs';
import {ɵɵinject} from '../../di/injector_compatibility';
import * as r3 from '../index';
import * as sanitization from '../../sanitization/sanitization';
@ -18,117 +18,117 @@ import * as sanitization from '../../sanitization/sanitization';
* This should be kept up to date with the public exports of @angular/core.
*/
export const angularCoreEnv: {[name: string]: Function} = {
'ΔdefineBase': r3.ΔdefineBase,
'ΔdefineComponent': r3.ΔdefineComponent,
'ΔdefineDirective': r3.ΔdefineDirective,
'ΔdefineInjectable': ΔdefineInjectable,
'ΔdefineInjector': ΔdefineInjector,
'ΔdefineNgModule': r3.ΔdefineNgModule,
'ΔdefinePipe': r3.ΔdefinePipe,
'ΔdirectiveInject': r3.ΔdirectiveInject,
'ΔgetFactoryOf': r3.ΔgetFactoryOf,
'ΔgetInheritedFactory': r3.ΔgetInheritedFactory,
'Δinject': Δinject,
'ΔinjectAttribute': r3.ΔinjectAttribute,
'ΔtemplateRefExtractor': r3.ΔtemplateRefExtractor,
'ΔNgOnChangesFeature': r3.ΔNgOnChangesFeature,
'ΔProvidersFeature': r3.ΔProvidersFeature,
'ΔInheritDefinitionFeature': r3.ΔInheritDefinitionFeature,
'ΔelementAttribute': r3.ΔelementAttribute,
'Δbind': r3.Δbind,
'Δcontainer': r3.Δcontainer,
'ΔnextContext': r3.ΔnextContext,
'ΔcontainerRefreshStart': r3.ΔcontainerRefreshStart,
'ΔcontainerRefreshEnd': r3.ΔcontainerRefreshEnd,
'ΔnamespaceHTML': r3.ΔnamespaceHTML,
'ΔnamespaceMathML': r3.ΔnamespaceMathML,
'ΔnamespaceSVG': r3.ΔnamespaceSVG,
'ΔenableBindings': r3.ΔenableBindings,
'ΔdisableBindings': r3.ΔdisableBindings,
'ΔallocHostVars': r3.ΔallocHostVars,
'ΔelementStart': r3.ΔelementStart,
'ΔelementEnd': r3.ΔelementEnd,
'Δelement': r3.Δelement,
'ΔelementContainerStart': r3.ΔelementContainerStart,
'ΔelementContainerEnd': r3.ΔelementContainerEnd,
'ΔpureFunction0': r3.ΔpureFunction0,
'ΔpureFunction1': r3.ΔpureFunction1,
'ΔpureFunction2': r3.ΔpureFunction2,
'ΔpureFunction3': r3.ΔpureFunction3,
'ΔpureFunction4': r3.ΔpureFunction4,
'ΔpureFunction5': r3.ΔpureFunction5,
'ΔpureFunction6': r3.ΔpureFunction6,
'ΔpureFunction7': r3.ΔpureFunction7,
'ΔpureFunction8': r3.ΔpureFunction8,
'ΔpureFunctionV': r3.ΔpureFunctionV,
'ΔgetCurrentView': r3.ΔgetCurrentView,
'ΔrestoreView': r3.ΔrestoreView,
'Δinterpolation1': r3.Δinterpolation1,
'Δinterpolation2': r3.Δinterpolation2,
'Δinterpolation3': r3.Δinterpolation3,
'Δinterpolation4': r3.Δinterpolation4,
'Δinterpolation5': r3.Δinterpolation5,
'Δinterpolation6': r3.Δinterpolation6,
'Δinterpolation7': r3.Δinterpolation7,
'Δinterpolation8': r3.Δinterpolation8,
'ΔinterpolationV': r3.ΔinterpolationV,
'Δlistener': r3.Δlistener,
'Δload': r3.Δload,
'Δprojection': r3.Δprojection,
'ΔelementProperty': r3.ΔelementProperty,
'ΔcomponentHostSyntheticProperty': r3.ΔcomponentHostSyntheticProperty,
'ΔcomponentHostSyntheticListener': r3.ΔcomponentHostSyntheticListener,
'ΔpipeBind1': r3.ΔpipeBind1,
'ΔpipeBind2': r3.ΔpipeBind2,
'ΔpipeBind3': r3.ΔpipeBind3,
'ΔpipeBind4': r3.ΔpipeBind4,
'ΔpipeBindV': r3.ΔpipeBindV,
'ΔprojectionDef': r3.ΔprojectionDef,
'Δpipe': r3.Δpipe,
'ΔqueryRefresh': r3.ΔqueryRefresh,
'ΔviewQuery': r3.ΔviewQuery,
'ΔstaticViewQuery': r3.ΔstaticViewQuery,
'ΔstaticContentQuery': r3.ΔstaticContentQuery,
'ΔloadViewQuery': r3.ΔloadViewQuery,
'ΔcontentQuery': r3.ΔcontentQuery,
'ΔloadContentQuery': r3.ΔloadContentQuery,
'Δreference': r3.Δreference,
'ΔelementHostAttrs': r3.ΔelementHostAttrs,
'ΔelementStyling': r3.ΔelementStyling,
'ΔelementStylingMap': r3.ΔelementStylingMap,
'ΔelementStyleProp': r3.ΔelementStyleProp,
'ΔelementStylingApply': r3.ΔelementStylingApply,
'ΔelementClassProp': r3.ΔelementClassProp,
'ΔelementHostStyling': r3.ΔelementHostStyling,
'ΔelementHostStylingMap': r3.ΔelementHostStylingMap,
'ΔelementHostStyleProp': r3.ΔelementHostStyleProp,
'ΔelementHostStylingApply': r3.ΔelementHostStylingApply,
'ΔelementHostClassProp': r3.ΔelementHostClassProp,
'Δselect': r3.Δselect,
'Δtemplate': r3.Δtemplate,
'Δtext': r3.Δtext,
'ΔtextBinding': r3.ΔtextBinding,
'ΔembeddedViewStart': r3.ΔembeddedViewStart,
'ΔembeddedViewEnd': r3.ΔembeddedViewEnd,
'Δi18n': r3.Δi18n,
'Δi18nAttributes': r3.Δi18nAttributes,
'Δi18nExp': r3.Δi18nExp,
'Δi18nStart': r3.Δi18nStart,
'Δi18nEnd': r3.Δi18nEnd,
'Δi18nApply': r3.Δi18nApply,
'Δi18nPostprocess': r3.Δi18nPostprocess,
'Δi18nLocalize': r3.Δi18nLocalize,
'ΔresolveWindow': r3.ΔresolveWindow,
'ΔresolveDocument': r3.ΔresolveDocument,
'ΔresolveBody': r3.ΔresolveBody,
'ΔsetComponentScope': r3.ΔsetComponentScope,
'ΔsetNgModuleScope': r3.ΔsetNgModuleScope,
'ɵɵdefineBase': r3.ɵɵdefineBase,
'ɵɵdefineComponent': r3.ɵɵdefineComponent,
'ɵɵdefineDirective': r3.ɵɵdefineDirective,
'ɵɵdefineInjectable': ɵɵdefineInjectable,
'ɵɵdefineInjector': ɵɵdefineInjector,
'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,
'ɵɵdefinePipe': r3.ɵɵdefinePipe,
'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,
'ɵɵgetFactoryOf': r3.ɵɵgetFactoryOf,
'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,
'ɵɵinject': ɵɵinject,
'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,
'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,
'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,
'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,
'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,
'ɵɵelementAttribute': r3.ɵɵelementAttribute,
'ɵɵbind': r3.ɵɵbind,
'ɵɵcontainer': r3.ɵɵcontainer,
'ɵɵnextContext': r3.ɵɵnextContext,
'ɵɵcontainerRefreshStart': r3.ɵɵcontainerRefreshStart,
'ɵɵcontainerRefreshEnd': r3.ɵɵcontainerRefreshEnd,
'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,
'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,
'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,
'ɵɵenableBindings': r3.ɵɵenableBindings,
'ɵɵdisableBindings': r3.ɵɵdisableBindings,
'ɵɵallocHostVars': r3.ɵɵallocHostVars,
'ɵɵelementStart': r3.ɵɵelementStart,
'ɵɵelementEnd': r3.ɵɵelementEnd,
'ɵɵelement': r3.ɵɵelement,
'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,
'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,
'ɵɵpureFunction0': r3.ɵɵpureFunction0,
'ɵɵpureFunction1': r3.ɵɵpureFunction1,
'ɵɵpureFunction2': r3.ɵɵpureFunction2,
'ɵɵpureFunction3': r3.ɵɵpureFunction3,
'ɵɵpureFunction4': r3.ɵɵpureFunction4,
'ɵɵpureFunction5': r3.ɵɵpureFunction5,
'ɵɵpureFunction6': r3.ɵɵpureFunction6,
'ɵɵpureFunction7': r3.ɵɵpureFunction7,
'ɵɵpureFunction8': r3.ɵɵpureFunction8,
'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,
'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,
'ɵɵrestoreView': r3.ɵɵrestoreView,
'ɵɵinterpolation1': r3.ɵɵinterpolation1,
'ɵɵinterpolation2': r3.ɵɵinterpolation2,
'ɵɵinterpolation3': r3.ɵɵinterpolation3,
'ɵɵinterpolation4': r3.ɵɵinterpolation4,
'ɵɵinterpolation5': r3.ɵɵinterpolation5,
'ɵɵinterpolation6': r3.ɵɵinterpolation6,
'ɵɵinterpolation7': r3.ɵɵinterpolation7,
'ɵɵinterpolation8': r3.ɵɵinterpolation8,
'ɵɵinterpolationV': r3.ɵɵinterpolationV,
'ɵɵlistener': r3.ɵɵlistener,
'ɵɵload': r3.ɵɵload,
'ɵɵprojection': r3.ɵɵprojection,
'ɵɵelementProperty': r3.ɵɵelementProperty,
'ɵɵcomponentHostSyntheticProperty': r3.ɵɵcomponentHostSyntheticProperty,
'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,
'ɵɵpipeBind1': r3.ɵɵpipeBind1,
'ɵɵpipeBind2': r3.ɵɵpipeBind2,
'ɵɵpipeBind3': r3.ɵɵpipeBind3,
'ɵɵpipeBind4': r3.ɵɵpipeBind4,
'ɵɵpipeBindV': r3.ɵɵpipeBindV,
'ɵɵprojectionDef': r3.ɵɵprojectionDef,
'ɵɵpipe': r3.ɵɵpipe,
'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,
'ɵɵviewQuery': r3.ɵɵviewQuery,
'ɵɵstaticViewQuery': r3.ɵɵstaticViewQuery,
'ɵɵstaticContentQuery': r3.ɵɵstaticContentQuery,
'ɵɵloadViewQuery': r3.ɵɵloadViewQuery,
'ɵɵcontentQuery': r3.ɵɵcontentQuery,
'ɵɵloadContentQuery': r3.ɵɵloadContentQuery,
'ɵɵreference': r3.ɵɵreference,
'ɵɵelementHostAttrs': r3.ɵɵelementHostAttrs,
'ɵɵelementStyling': r3.ɵɵelementStyling,
'ɵɵelementStylingMap': r3.ɵɵelementStylingMap,
'ɵɵelementStyleProp': r3.ɵɵelementStyleProp,
'ɵɵelementStylingApply': r3.ɵɵelementStylingApply,
'ɵɵelementClassProp': r3.ɵɵelementClassProp,
'ɵɵelementHostStyling': r3.ɵɵelementHostStyling,
'ɵɵelementHostStylingMap': r3.ɵɵelementHostStylingMap,
'ɵɵelementHostStyleProp': r3.ɵɵelementHostStyleProp,
'ɵɵelementHostStylingApply': r3.ɵɵelementHostStylingApply,
'ɵɵelementHostClassProp': r3.ɵɵelementHostClassProp,
'ɵɵselect': r3.ɵɵselect,
'ɵɵtemplate': r3.ɵɵtemplate,
'ɵɵtext': r3.ɵɵtext,
'ɵɵtextBinding': r3.ɵɵtextBinding,
'ɵɵembeddedViewStart': r3.ɵɵembeddedViewStart,
'ɵɵembeddedViewEnd': r3.ɵɵembeddedViewEnd,
'ɵɵi18n': r3.ɵɵi18n,
'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,
'ɵɵi18nExp': r3.ɵɵi18nExp,
'ɵɵi18nStart': r3.ɵɵi18nStart,
'ɵɵi18nEnd': r3.ɵɵi18nEnd,
'ɵɵi18nApply': r3.ɵɵi18nApply,
'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,
'ɵɵi18nLocalize': r3.ɵɵi18nLocalize,
'ɵɵresolveWindow': r3.ɵɵresolveWindow,
'ɵɵresolveDocument': r3.ɵɵresolveDocument,
'ɵɵresolveBody': r3.ɵɵresolveBody,
'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,
'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,
'ΔsanitizeHtml': sanitization.ΔsanitizeHtml,
'ΔsanitizeStyle': sanitization.ΔsanitizeStyle,
'ΔdefaultStyleSanitizer': sanitization.ΔdefaultStyleSanitizer,
'ΔsanitizeResourceUrl': sanitization.ΔsanitizeResourceUrl,
'ΔsanitizeScript': sanitization.ΔsanitizeScript,
'ΔsanitizeUrl': sanitization.ΔsanitizeUrl,
'ΔsanitizeUrlOrResourceUrl': sanitization.ΔsanitizeUrlOrResourceUrl
'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,
'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,
'ɵɵdefaultStyleSanitizer': sanitization.ɵɵdefaultStyleSanitizer,
'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,
'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,
'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,
'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl
};

View File

@ -9,10 +9,10 @@
import {WrappedValue} from '../change_detection/change_detection_util';
import {PipeTransform} from '../change_detection/pipe_transform';
import {store, Δload} from './instructions/all';
import {store, ɵɵload} from './instructions/all';
import {PipeDef, PipeDefList} from './interfaces/definition';
import {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';
import {ΔpureFunction1, ΔpureFunction2, ΔpureFunction3, ΔpureFunction4, ΔpureFunctionV} from './pure_function';
import {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunctionV} from './pure_function';
import {getLView} from './state';
import {NO_CHANGE} from './tokens';
@ -27,7 +27,7 @@ import {NO_CHANGE} from './tokens';
*
* @codeGenApi
*/
export function Δpipe(index: number, pipeName: string): any {
export function ɵɵpipe(index: number, pipeName: string): any {
const tView = getLView()[TVIEW];
let pipeDef: PipeDef<any>;
const adjustedIndex = index + HEADER_OFFSET;
@ -81,10 +81,10 @@ function getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> {
*
* @codeGenApi
*/
export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any {
const pipeInstance = Δload<PipeTransform>(index);
export function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {
const pipeInstance = ɵɵload<PipeTransform>(index);
return unwrapValue(
isPure(index) ? ΔpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :
isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :
pipeInstance.transform(v1));
}
@ -101,10 +101,10 @@ export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any {
*
* @codeGenApi
*/
export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {
const pipeInstance = Δload<PipeTransform>(index);
export function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {
const pipeInstance = ɵɵload<PipeTransform>(index);
return unwrapValue(
isPure(index) ? ΔpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :
isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :
pipeInstance.transform(v1, v2));
}
@ -122,11 +122,12 @@ export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any)
*
* @codeGenApi
*/
export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {
const pipeInstance = Δload<PipeTransform>(index);
export function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {
const pipeInstance = ɵɵload<PipeTransform>(index);
return unwrapValue(
isPure(index) ? ΔpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :
pipeInstance.transform(v1, v2, v3));
isPure(index) ?
ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :
pipeInstance.transform(v1, v2, v3));
}
/**
@ -144,12 +145,12 @@ export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any,
*
* @codeGenApi
*/
export function ΔpipeBind4(
export function ɵɵpipeBind4(
index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {
const pipeInstance = Δload<PipeTransform>(index);
const pipeInstance = ɵɵload<PipeTransform>(index);
return unwrapValue(
isPure(index) ?
ΔpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :
ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :
pipeInstance.transform(v1, v2, v3, v4));
}
@ -165,10 +166,10 @@ export function ΔpipeBind4(
*
* @codeGenApi
*/
export function ΔpipeBindV(index: number, slotOffset: number, values: any[]): any {
const pipeInstance = Δload<PipeTransform>(index);
export function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any {
const pipeInstance = ɵɵload<PipeTransform>(index);
return unwrapValue(
isPure(index) ? ΔpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :
isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :
pipeInstance.transform.apply(pipeInstance, values));
}

View File

@ -40,7 +40,7 @@ import {getBindingRoot, getLView, isCreationMode} from './state';
*
* @codeGenApi
*/
export function ΔpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {
export function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
const bindingIndex = getBindingRoot() + slotOffset;
const lView = getLView();
@ -61,7 +61,7 @@ export function ΔpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?
*
* @codeGenApi
*/
export function ΔpureFunction1(
export function ɵɵpureFunction1(
slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
const lView = getLView();
@ -84,7 +84,7 @@ export function ΔpureFunction1(
*
* @codeGenApi
*/
export function ΔpureFunction2(
export function ɵɵpureFunction2(
slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,
thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
@ -111,7 +111,7 @@ export function ΔpureFunction2(
*
* @codeGenApi
*/
export function ΔpureFunction3(
export function ɵɵpureFunction3(
slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,
thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
@ -139,7 +139,7 @@ export function ΔpureFunction3(
*
* @codeGenApi
*/
export function ΔpureFunction4(
export function ɵɵpureFunction4(
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,
exp3: any, exp4: any, thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
@ -168,7 +168,7 @@ export function ΔpureFunction4(
*
* @codeGenApi
*/
export function ΔpureFunction5(
export function ɵɵpureFunction5(
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,
exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
@ -199,7 +199,7 @@ export function ΔpureFunction5(
*
* @codeGenApi
*/
export function ΔpureFunction6(
export function ɵɵpureFunction6(
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
@ -232,7 +232,7 @@ export function ΔpureFunction6(
*
* @codeGenApi
*/
export function ΔpureFunction7(
export function ɵɵpureFunction7(
slotOffset: number,
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,
exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {
@ -267,7 +267,7 @@ export function ΔpureFunction7(
*
* @codeGenApi
*/
export function ΔpureFunction8(
export function ɵɵpureFunction8(
slotOffset: number,
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,
@ -299,7 +299,7 @@ export function ΔpureFunction8(
*
* @codeGenApi
*/
export function ΔpureFunctionV(
export function ɵɵpureFunctionV(
slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
let bindingIndex = getBindingRoot() + slotOffset;

View File

@ -18,7 +18,7 @@ import {assertDataInRange, assertDefined, assertEqual} from '../util/assert';
import {assertPreviousIsParent} from './assert';
import {getNodeInjectable, locateDirectiveOrProvider} from './di';
import {NG_ELEMENT_ID} from './fields';
import {store, Δload} from './instructions/all';
import {store, ɵɵload} from './instructions/all';
import {storeCleanupWithContext} from './instructions/shared';
import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';
import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';
@ -372,7 +372,7 @@ export function query<T>(
*
* @codeGenApi
*/
export function ΔqueryRefresh(queryList: QueryList<any>): boolean {
export function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {
const queryListImpl = (queryList as any as QueryList_<any>);
const creationMode = isCreationMode();
@ -394,10 +394,10 @@ export function ΔqueryRefresh(queryList: QueryList<any>): boolean {
*
* @codeGenApi
*/
export function ΔstaticViewQuery<T>(
export function ɵɵstaticViewQuery<T>(
// TODO(FW-486): "read" should be an AbstractType
predicate: Type<any>| string[], descend: boolean, read: any): void {
const queryList = ΔviewQuery(predicate, descend, read) as QueryList_<T>;
const queryList = ɵɵviewQuery(predicate, descend, read) as QueryList_<T>;
const tView = getLView()[TVIEW];
queryList._static = true;
if (!tView.staticViewQueries) {
@ -415,7 +415,7 @@ export function ΔstaticViewQuery<T>(
*
* @codeGenApi
*/
export function ΔviewQuery<T>(
export function ɵɵviewQuery<T>(
// TODO(FW-486): "read" should be an AbstractType
predicate: Type<any>| string[], descend: boolean, read: any): QueryList<T> {
const lView = getLView();
@ -435,10 +435,10 @@ export function ΔviewQuery<T>(
*
* @codeGenApi
*/
export function ΔloadViewQuery<T>(): T {
export function ɵɵloadViewQuery<T>(): T {
const index = getCurrentQueryIndex();
setCurrentQueryIndex(index + 1);
return Δload<T>(index - HEADER_OFFSET);
return ɵɵload<T>(index - HEADER_OFFSET);
}
/**
@ -453,7 +453,7 @@ export function ΔloadViewQuery<T>(): T {
*
* @codeGenApi
*/
export function ΔcontentQuery<T>(
export function ɵɵcontentQuery<T>(
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
// TODO(FW-486): "read" should be an AbstractType
read: any): QueryList<T> {
@ -484,11 +484,11 @@ export function ΔcontentQuery<T>(
*
* @codeGenApi
*/
export function ΔstaticContentQuery<T>(
export function ɵɵstaticContentQuery<T>(
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
// TODO(FW-486): "read" should be an AbstractType
read: any): void {
const queryList = ΔcontentQuery(directiveIndex, predicate, descend, read) as QueryList_<T>;
const queryList = ɵɵcontentQuery(directiveIndex, predicate, descend, read) as QueryList_<T>;
const tView = getLView()[TVIEW];
queryList._static = true;
if (!tView.staticContentQueries) {
@ -500,7 +500,7 @@ export function ΔstaticContentQuery<T>(
*
* @codeGenApi
*/
export function ΔloadContentQuery<T>(): QueryList<T> {
export function ɵɵloadContentQuery<T>(): QueryList<T> {
const lView = getLView();
ngDevMode &&
assertDefined(

View File

@ -82,17 +82,17 @@ export function getBindingsEnabled(): boolean {
* Should match component / directive.
* </my-comp>
* <div ngNonBindable>
* <!-- ΔdisableBindings() -->
* <!-- ɵɵdisableBindings() -->
* <my-comp my-directive>
* Should not match component / directive because we are in ngNonBindable.
* </my-comp>
* <!-- ΔenableBindings() -->
* <!-- ɵɵenableBindings() -->
* </div>
* ```
*
* @codeGenApi
*/
export function ΔenableBindings(): void {
export function ɵɵenableBindings(): void {
bindingsEnabled = true;
}
@ -105,17 +105,17 @@ export function ΔenableBindings(): void {
* Should match component / directive.
* </my-comp>
* <div ngNonBindable>
* <!-- ΔdisableBindings() -->
* <!-- ɵɵdisableBindings() -->
* <my-comp my-directive>
* Should not match component / directive because we are in ngNonBindable.
* </my-comp>
* <!-- ΔenableBindings() -->
* <!-- ɵɵenableBindings() -->
* </div>
* ```
*
* @codeGenApi
*/
export function ΔdisableBindings(): void {
export function ɵɵdisableBindings(): void {
bindingsEnabled = false;
}
@ -269,7 +269,7 @@ export function getActiveDirectiveSuperClassDepth() {
*
* @codeGenApi
*/
export function ΔrestoreView(viewToRestore: OpaqueViewState) {
export function ɵɵrestoreView(viewToRestore: OpaqueViewState) {
contextLView = viewToRestore as any as LView;
}
@ -492,7 +492,7 @@ let _currentNamespace: string|null = null;
*
* @codeGenApi
*/
export function ΔnamespaceSVG() {
export function ɵɵnamespaceSVG() {
_currentNamespace = 'http://www.w3.org/2000/svg';
}
@ -501,7 +501,7 @@ export function ΔnamespaceSVG() {
*
* @codeGenApi
*/
export function ΔnamespaceMathML() {
export function ɵɵnamespaceMathML() {
_currentNamespace = 'http://www.w3.org/1998/MathML/';
}
@ -511,7 +511,7 @@ export function ΔnamespaceMathML() {
*
* @codeGenApi
*/
export function ΔnamespaceHTML() {
export function ɵɵnamespaceHTML() {
_currentNamespace = null;
}

View File

@ -45,7 +45,7 @@ export const defaultScheduler =
*
* @codeGenApi
*/
export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) {
export function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {
return {name: 'window', target: element.ownerDocument.defaultView};
}
@ -53,7 +53,7 @@ export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) {
*
* @codeGenApi
*/
export function ΔresolveDocument(element: RElement & {ownerDocument: Document}) {
export function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {
return {name: 'document', target: element.ownerDocument};
}
@ -61,7 +61,7 @@ export function ΔresolveDocument(element: RElement & {ownerDocument: Document})
*
* @codeGenApi
*/
export function ΔresolveBody(element: RElement & {ownerDocument: Document}) {
export function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {
return {name: 'body', target: element.ownerDocument.body};
}

View File

@ -22,6 +22,6 @@ import {createTemplateRef} from './view_engine_compatibility';
*
* @codeGenApi
*/
export function ΔtemplateRefExtractor(tNode: TNode, currentView: LView) {
export function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView) {
return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);
}

View File

@ -33,7 +33,7 @@ import {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';
*
* @publicApi
*/
export function ΔsanitizeHtml(unsafeHtml: any): string {
export function ɵɵsanitizeHtml(unsafeHtml: any): string {
const sanitizer = getSanitizer();
if (sanitizer) {
return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';
@ -59,7 +59,7 @@ export function ΔsanitizeHtml(unsafeHtml: any): string {
*
* @publicApi
*/
export function ΔsanitizeStyle(unsafeStyle: any): string {
export function ɵɵsanitizeStyle(unsafeStyle: any): string {
const sanitizer = getSanitizer();
if (sanitizer) {
return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
@ -86,7 +86,7 @@ export function ΔsanitizeStyle(unsafeStyle: any): string {
*
* @publicApi
*/
export function ΔsanitizeUrl(unsafeUrl: any): string {
export function ɵɵsanitizeUrl(unsafeUrl: any): string {
const sanitizer = getSanitizer();
if (sanitizer) {
return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';
@ -108,7 +108,7 @@ export function ΔsanitizeUrl(unsafeUrl: any): string {
*
* @publicApi
*/
export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string {
export function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string {
const sanitizer = getSanitizer();
if (sanitizer) {
return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';
@ -131,7 +131,7 @@ export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string {
*
* @publicApi
*/
export function ΔsanitizeScript(unsafeScript: any): string {
export function ɵɵsanitizeScript(unsafeScript: any): string {
const sanitizer = getSanitizer();
if (sanitizer) {
return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
@ -153,9 +153,9 @@ export function getUrlSanitizer(tag: string, prop: string) {
if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||
tag === 'media' || tag === 'script')) ||
(prop === 'href' && (tag === 'base' || tag === 'link'))) {
return ΔsanitizeResourceUrl;
return ɵɵsanitizeResourceUrl;
}
return ΔsanitizeUrl;
return ɵɵsanitizeUrl;
}
/**
@ -173,7 +173,7 @@ export function getUrlSanitizer(tag: string, prop: string) {
*
* @publicApi
*/
export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {
export function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {
return getUrlSanitizer(tag, prop)(unsafeUrl);
}
@ -183,13 +183,13 @@ export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: st
*
* @publicApi
*/
export const ΔdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
export const ɵɵdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
if (value === undefined) {
return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
prop === 'filter' || prop === 'list-style' || prop === 'list-style-image';
}
return ΔsanitizeStyle(value);
return ɵɵsanitizeStyle(value);
} as StyleSanitizeFn);
export function validateAgainstEventProperties(name: string) {

View File

@ -9,7 +9,7 @@
import {resolveForwardRef} from '../di/forward_ref';
import {INJECTOR, Injector} from '../di/injector';
import {setCurrentInjector} from '../di/injector_compatibility';
import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs';
import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';
import {APP_ROOT} from '../di/scope';
import {NgModuleRef} from '../linker/ng_module_factory';
import {stringify} from '../util/stringify';
@ -98,7 +98,7 @@ export function resolveNgModuleDep(
return data;
}
const providerDef = data._def.providersByKey[tokenKey];
let injectableDef: ΔInjectableDef<any>|null;
let injectableDef: ɵɵInjectableDef<any>|null;
if (providerDef) {
let providerInstance = data._providers[providerDef.index];
if (providerInstance === undefined) {
@ -132,7 +132,7 @@ function moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean
return ngModule._def.modules.indexOf(scope) > -1;
}
function targetsModule(ngModule: NgModuleData, def: ΔInjectableDef<any>): boolean {
function targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDef<any>): boolean {
return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||
def.providedIn === 'root' && ngModule._def.isRoot);
}

View File

@ -9,7 +9,7 @@
import {DebugElement__PRE_R3__, DebugNode__PRE_R3__, EventListener, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';
import {Injector} from '../di';
import {InjectableType} from '../di/injectable';
import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs';
import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';
import {ErrorHandler} from '../error_handler';
import {Type} from '../interface/type';
import {ComponentFactory} from '../linker/component_factory';
@ -170,7 +170,7 @@ const viewDefOverrides = new Map<any, ViewDefinition>();
function debugOverrideProvider(override: ProviderOverride) {
providerOverrides.set(override.token, override);
let injectableDef: ΔInjectableDef<any>|null;
let injectableDef: ɵɵInjectableDef<any>|null;
if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&
typeof injectableDef.providedIn === 'function') {
providerOverridesWithScope.set(override.token as InjectableType<any>, override);