fix(ivy): *Def types are private (ɵ) symbols (#24738)

On accident a few of the definition types were emitted as public API
symbols. Much of the Ivy API surface is still prefixed with ɵ,
indicating it's a private API. The definition types should be private
for now.

PR Close #24738
This commit is contained in:
Alex Rickabaugh 2018-06-29 14:17:42 -07:00 committed by Matias Niemelä
parent 9f20dd937a
commit cde0b4b361
6 changed files with 19 additions and 19 deletions

View File

@ -35,8 +35,8 @@ const CORE_SUPPORTED_SYMBOLS = new Set<string>([
'ɵdefineNgModule', 'ɵdefineNgModule',
'inject', 'inject',
'InjectableDef', 'InjectableDef',
'InjectorDef', 'ɵInjectorDef',
'NgModuleDef', 'ɵNgModuleDef',
]); ]);
export class ImportManager { export class ImportManager {

View File

@ -144,7 +144,7 @@ describe('ngtsc behavioral tests', () => {
expect(jsContents).not.toContain('__decorate'); expect(jsContents).not.toContain('__decorate');
const dtsContents = getContents('test.d.ts'); const dtsContents = getContents('test.d.ts');
expect(dtsContents).toContain('static ngComponentDef: i0.ComponentDef<TestCmp, \'test-cmp\'>'); expect(dtsContents).toContain('static ngComponentDef: i0.ɵComponentDef<TestCmp, \'test-cmp\'>');
}); });
it('should compile Components without errors', () => { it('should compile Components without errors', () => {
@ -196,9 +196,9 @@ describe('ngtsc behavioral tests', () => {
'declarations: [TestCmp], imports: [], exports: [] })'); 'declarations: [TestCmp], imports: [], exports: [] })');
const dtsContents = getContents('test.d.ts'); const dtsContents = getContents('test.d.ts');
expect(dtsContents).toContain('static ngComponentDef: i0.ComponentDef<TestCmp, \'test-cmp\'>'); expect(dtsContents).toContain('static ngComponentDef: i0.ɵComponentDef<TestCmp, \'test-cmp\'>');
expect(dtsContents) expect(dtsContents)
.toContain('static ngModuleDef: i0.NgModuleDef<TestModule, [TestCmp], [], []>'); .toContain('static ngModuleDef: i0.ɵNgModuleDef<TestModule, [TestCmp], [], []>');
expect(dtsContents).not.toContain('__decorate'); expect(dtsContents).not.toContain('__decorate');
}); });
@ -240,8 +240,8 @@ describe('ngtsc behavioral tests', () => {
const dtsContents = getContents('test.d.ts'); const dtsContents = getContents('test.d.ts');
expect(dtsContents) expect(dtsContents)
.toContain('static ngModuleDef: i0.NgModuleDef<TestModule, [TestCmp], [OtherModule], []>'); .toContain('static ngModuleDef: i0.ɵNgModuleDef<TestModule, [TestCmp], [OtherModule], []>');
expect(dtsContents).toContain('static ngInjectorDef: i0.InjectorDef'); expect(dtsContents).toContain('static ngInjectorDef: i0.ɵInjectorDef');
}); });
it('should compile Pipes without errors', () => { it('should compile Pipes without errors', () => {
@ -342,6 +342,6 @@ describe('ngtsc behavioral tests', () => {
expect(jsContents).toContain('pipes: [TestPipe]'); expect(jsContents).toContain('pipes: [TestPipe]');
const dtsContents = getContents('test.d.ts'); const dtsContents = getContents('test.d.ts');
expect(dtsContents).toContain('i0.NgModuleDef<TestModule, [TestPipe,TestCmp], [], []>'); expect(dtsContents).toContain('i0.ɵNgModuleDef<TestModule, [TestPipe,TestCmp], [], []>');
}); });
}); });

View File

@ -104,7 +104,7 @@ export class Identifiers {
static defineComponent: o.ExternalReference = {name: 'ɵdefineComponent', moduleName: CORE}; static defineComponent: o.ExternalReference = {name: 'ɵdefineComponent', moduleName: CORE};
static ComponentDef: o.ExternalReference = { static ComponentDef: o.ExternalReference = {
name: 'ComponentDef', name: 'ɵComponentDef',
moduleName: CORE, moduleName: CORE,
}; };
@ -114,12 +114,12 @@ export class Identifiers {
}; };
static DirectiveDef: o.ExternalReference = { static DirectiveDef: o.ExternalReference = {
name: 'DirectiveDef', name: 'ɵDirectiveDef',
moduleName: CORE, moduleName: CORE,
}; };
static InjectorDef: o.ExternalReference = { static InjectorDef: o.ExternalReference = {
name: 'InjectorDef', name: 'ɵInjectorDef',
moduleName: CORE, moduleName: CORE,
}; };
@ -129,7 +129,7 @@ export class Identifiers {
}; };
static NgModuleDef: o.ExternalReference = { static NgModuleDef: o.ExternalReference = {
name: 'NgModuleDef', name: 'ɵNgModuleDef',
moduleName: CORE, moduleName: CORE,
}; };

View File

@ -13,7 +13,7 @@
*/ */
export * from './di/metadata'; export * from './di/metadata';
export {InjectableType, InjectorType, defineInjectable, defineInjector} from './di/defs'; export {InjectableType, InjectorDef, InjectorType, defineInjectable, defineInjector} from './di/defs';
export {forwardRef, resolveForwardRef, ForwardRefFn} from './di/forward_ref'; export {forwardRef, resolveForwardRef, ForwardRefFn} from './di/forward_ref';
export {Injectable, InjectableDecorator, InjectableProvider} from './di/injectable'; export {Injectable, InjectableDecorator, InjectableProvider} from './di/injectable';
export {inject, InjectFlags, INJECTOR, Injector} from './di/injector'; export {inject, InjectFlags, INJECTOR, Injector} from './di/injector';

View File

@ -19,9 +19,9 @@
* The below symbols are used for @Injectable and @NgModule compilation. * The below symbols are used for @Injectable and @NgModule compilation.
*/ */
export {InjectableDef, InjectorDef, defineInjectable, defineInjector} from './di/defs'; export {InjectableDef, InjectorDef as ɵInjectorDef, defineInjectable, defineInjector} from './di/defs';
export {inject} from './di/injector'; export {inject} from './di/injector';
export {NgModuleDef} from './metadata/ng_module'; export {NgModuleDef as ɵNgModuleDef} from './metadata/ng_module';
export {defineNgModule as ɵdefineNgModule} from './render3/definition'; export {defineNgModule as ɵdefineNgModule} from './render3/definition';

View File

@ -12,10 +12,10 @@ import {Identifiers} from '@angular/compiler/src/render3/r3_identifiers';
import {angularCoreEnv} from '../../src/render3/jit/environment'; import {angularCoreEnv} from '../../src/render3/jit/environment';
const INTERFACE_EXCEPTIONS = new Set<string>([ const INTERFACE_EXCEPTIONS = new Set<string>([
'ComponentDef', 'ɵComponentDef',
'DirectiveDef', 'ɵDirectiveDef',
'InjectorDef', 'ɵInjectorDef',
'NgModuleDef', 'ɵNgModuleDef',
'ɵPipeDef', 'ɵPipeDef',
]); ]);