refactor(ivy): migrate ɵɵ prefix back to Δ (#30362)

Now that issues are resolved with Closure compiler, we can move back to our desired prefix of `Δ`.

PR Close #30362
This commit is contained in:
Ben Lesh
2019-05-09 11:47:25 -07:00
committed by Alex Rickabaugh
parent dbb150a9bd
commit cf86ed7b29
142 changed files with 6417 additions and 6453 deletions

View File

@ -9,7 +9,7 @@
import '../util/ng_dev_mode';
import {ChangeDetectionStrategy} from '../change_detection/constants';
import {NG_INJECTABLE_DEF, ɵɵdefineInjectable} from '../di/interface/defs';
import {NG_INJECTABLE_DEF, ΔdefineInjectable} from '../di/interface/defs';
import {Mutable, Type} from '../interface/type';
import {NgModuleDef} from '../metadata/ng_module';
import {SchemaMetadata} from '../metadata/schema';
@ -19,7 +19,7 @@ import {stringify} from '../util/stringify';
import {EMPTY_ARRAY, EMPTY_OBJ} from './empty';
import {NG_BASE_DEF, 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';
@ -42,7 +42,7 @@ let _renderCompCount = 0;
* ```
* @codeGenApi
*/
export function ɵɵdefineComponent<T>(componentDefinition: {
export function ΔdefineComponent<T>(componentDefinition: {
/**
* Directive type, needed to configure the injector.
*/
@ -308,7 +308,7 @@ export function ɵɵdefineComponent<T>(componentDefinition: {
// be retrieved through the node injector, so this isn't a problem.
if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {
(type as any)[NG_INJECTABLE_DEF] =
ɵɵdefineInjectable<T>({factory: componentDefinition.factory as() => T});
ΔdefineInjectable<T>({factory: componentDefinition.factory as() => T});
}
}) as never;
@ -318,7 +318,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);
@ -345,7 +345,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;
@ -393,7 +393,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>[]);
@ -497,7 +497,7 @@ function invertObject<T>(
* # Example
* ```ts
* class ShouldBeInherited {
* static ngBaseDef = ɵɵdefineBase({
* static ngBaseDef = ΔdefineBase({
* ...
* })
* }
@ -507,7 +507,7 @@ function invertObject<T>(
*
* @codeGenApi
*/
export function ɵɵdefineBase<T>(baseDefinition: {
export function ΔdefineBase<T>(baseDefinition: {
/**
* A map of input names.
*
@ -580,7 +580,7 @@ export function ɵɵdefineBase<T>(baseDefinition: {
* Function executed by the parent template to allow children to apply host bindings.
*/
hostBindings?: HostBindingsFunction<T>;
}): ɵɵBaseDef<T> {
}): ΔBaseDef<T> {
const declaredInputs: {[P in keyof T]: string} = {} as any;
return {
inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),
@ -600,7 +600,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({
* ...
* });
* }
@ -608,7 +608,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.
*/
@ -726,7 +726,7 @@ export const ɵɵdefineDirective = ɵɵdefineComponent as any as<T>(directiveDef
*
* @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,
@ -765,7 +765,7 @@ export function getPipeDef<T>(type: any): PipeDef<T>|null {
return (type as any)[NG_PIPE_DEF] || null;
}
export function getBaseDef<T>(type: any): ɵɵBaseDef<T>|null {
export function getBaseDef<T>(type: any): ΔBaseDef<T>|null {
return (type as any)[NG_BASE_DEF] || null;
}