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:

committed by
Alex Rickabaugh

parent
dbb150a9bd
commit
cf86ed7b29
@ -62,9 +62,9 @@ export function forwardRef<T>(fn: () => T): T {
|
||||
|
||||
export interface SimpleChanges { [propName: string]: any; }
|
||||
|
||||
export type ɵɵNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
|
||||
export type ɵɵDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;
|
||||
export type ɵɵPipeDefWithMeta<PipeT, NameT> = any;
|
||||
export type ΔNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
|
||||
export type ΔDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;
|
||||
export type ΔPipeDefWithMeta<PipeT, NameT> = any;
|
||||
|
||||
export enum ViewEncapsulation {
|
||||
Emulated = 0,
|
||||
|
@ -18,13 +18,12 @@ const varRegExp = (name: string): RegExp => new RegExp(`var \\w+ = \\[\"${name}\
|
||||
|
||||
const viewQueryRegExp = (descend: boolean, ref?: string): RegExp => {
|
||||
const maybeRef = ref ? `${ref}` : `null`;
|
||||
return new RegExp(`i0\\.\u0275\u0275viewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`);
|
||||
return new RegExp(`i0\\.ΔviewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`);
|
||||
};
|
||||
|
||||
const contentQueryRegExp = (predicate: string, descend: boolean, ref?: string): RegExp => {
|
||||
const maybeRef = ref ? `${ref}` : `null`;
|
||||
return new RegExp(
|
||||
`i0\\.\u0275\u0275contentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`);
|
||||
return new RegExp(`i0\\.ΔcontentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`);
|
||||
};
|
||||
|
||||
const setClassMetadataRegExp = (expectedType: string): RegExp =>
|
||||
@ -57,8 +56,8 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Dep>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Service>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Dep>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
||||
});
|
||||
|
||||
it('should compile Injectables with a generic service', () => {
|
||||
@ -76,8 +75,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('Store.ngInjectableDef =');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Store<any>>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Store<any>>;');
|
||||
});
|
||||
|
||||
it('should compile Injectables with providedIn without errors', () => {
|
||||
@ -101,12 +99,11 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toContain('Dep.ngInjectableDef =');
|
||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'return new (t || Service)(i0.\u0275\u0275inject(Dep)); }, providedIn: \'root\' });');
|
||||
.toContain('return new (t || Service)(i0.Δinject(Dep)); }, providedIn: \'root\' });');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Dep>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Service>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Dep>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
||||
});
|
||||
|
||||
it('should compile Injectables with providedIn and factory without errors', () => {
|
||||
@ -131,7 +128,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Service>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
||||
});
|
||||
|
||||
it('should compile Injectables with providedIn and factory with deps without errors', () => {
|
||||
@ -154,14 +151,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||
expect(jsContents).toContain('factory: function Service_Factory(t) { var r = null; if (t) {');
|
||||
expect(jsContents).toContain('(r = new t(i0.\u0275\u0275inject(Dep)));');
|
||||
expect(jsContents).toContain('(r = new t(i0.Δinject(Dep)));');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'(r = (function (dep) { return new Service(dep); })(i0.\u0275\u0275inject(Dep)));');
|
||||
.toContain('(r = (function (dep) { return new Service(dep); })(i0.Δinject(Dep)));');
|
||||
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.\u0275\u0275InjectableDef<Service>;');
|
||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
||||
});
|
||||
|
||||
it('should compile @Injectable with an @Optional dependency', () => {
|
||||
@ -197,13 +193,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.\u0275\u0275defineComponent');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngComponentDef: i0.\u0275\u0275ComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
});
|
||||
|
||||
it('should compile Components (dynamic inline template) without errors', () => {
|
||||
@ -221,13 +217,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.\u0275\u0275defineComponent');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngComponentDef: i0.\u0275\u0275ComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
});
|
||||
|
||||
it('should compile Components (function call inline template) without errors', () => {
|
||||
@ -248,13 +244,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.\u0275\u0275defineComponent');
|
||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
||||
expect(jsContents).not.toContain('__decorate');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngComponentDef: i0.\u0275\u0275ComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
});
|
||||
|
||||
it('should compile Components (external template) without errors', () => {
|
||||
@ -355,14 +351,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('TestBase.ngBaseDef = i0.\u0275\u0275defineBase');
|
||||
expect(jsContents).toContain('TestComponent.ngComponentDef = i0.\u0275\u0275defineComponent');
|
||||
expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.\u0275\u0275defineDirective');
|
||||
expect(jsContents).toContain('TestPipe.ngPipeDef = i0.\u0275\u0275definePipe');
|
||||
expect(jsContents)
|
||||
.toContain('TestInjectable.ngInjectableDef = i0.\u0275\u0275defineInjectable');
|
||||
expect(jsContents).toContain('MyModule.ngModuleDef = i0.\u0275\u0275defineNgModule');
|
||||
expect(jsContents).toContain('MyModule.ngInjectorDef = i0.\u0275\u0275defineInjector');
|
||||
expect(jsContents).toContain('TestBase.ngBaseDef = i0.ΔdefineBase');
|
||||
expect(jsContents).toContain('TestComponent.ngComponentDef = i0.ΔdefineComponent');
|
||||
expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.ΔdefineDirective');
|
||||
expect(jsContents).toContain('TestPipe.ngPipeDef = i0.ΔdefinePipe');
|
||||
expect(jsContents).toContain('TestInjectable.ngInjectableDef = i0.ΔdefineInjectable');
|
||||
expect(jsContents).toContain('MyModule.ngModuleDef = i0.ΔdefineNgModule');
|
||||
expect(jsContents).toContain('MyModule.ngInjectorDef = i0.ΔdefineInjector');
|
||||
expect(jsContents).toContain('inputs: { input: "input" }');
|
||||
expect(jsContents).toContain('outputs: { output: "output" }');
|
||||
});
|
||||
@ -447,42 +442,39 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule, bootstrap: [TestCmp] });');
|
||||
expect(jsContents)
|
||||
.toContain('i0.\u0275\u0275defineNgModule({ type: TestModule, bootstrap: [TestCmp] });');
|
||||
.toContain('/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { declarations: [TestCmp] });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'/*@__PURE__*/ i0.\u0275\u0275setNgModuleScope(TestModule, { declarations: [TestCmp] });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275defineInjector({ factory: ' +
|
||||
'i0.ΔdefineInjector({ factory: ' +
|
||||
'function TestModule_Factory(t) { return new (t || TestModule)(); } });');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngComponentDef: i0.\u0275\u0275ComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.\u0275\u0275NgModuleDefWithMeta<TestModule, [typeof TestCmp], never, never>');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], never, never>');
|
||||
expect(dtsContents).not.toContain('__decorate');
|
||||
});
|
||||
|
||||
it('should not emit a \u0275\u0275setNgModuleScope call when no scope metadata is present',
|
||||
() => {
|
||||
env.tsconfig();
|
||||
env.write('test.ts', `
|
||||
it('should not emit a ΔsetNgModuleScope call when no scope metadata is present', () => {
|
||||
env.tsconfig();
|
||||
env.write('test.ts', `
|
||||
import {NgModule} from '@angular/core';
|
||||
|
||||
@NgModule({})
|
||||
export class TestModule {}
|
||||
`);
|
||||
|
||||
env.driveMain();
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275defineNgModule({ type: TestModule });');
|
||||
expect(jsContents).not.toContain('\u0275\u0275setNgModuleScope(TestModule,');
|
||||
});
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents).not.toContain('ΔsetNgModuleScope(TestModule,');
|
||||
});
|
||||
|
||||
it('should emit the id when the module\'s id is a string', () => {
|
||||
env.tsconfig();
|
||||
@ -496,7 +488,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain(`i0.\u0275\u0275defineNgModule({ type: TestModule, id: 'test' })`);
|
||||
expect(jsContents).toContain(`i0.ΔdefineNgModule({ type: TestModule, id: 'test' })`);
|
||||
});
|
||||
|
||||
it('should emit the id when the module\'s id is defined as `module.id`', () => {
|
||||
@ -514,8 +506,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents)
|
||||
.toContain('i0.\u0275\u0275defineNgModule({ type: TestModule, id: module.id })');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule, id: module.id })');
|
||||
});
|
||||
|
||||
it('should filter out directives and pipes from module exports in the injector def', () => {
|
||||
@ -556,15 +547,15 @@ describe('ngtsc behavioral tests', () => {
|
||||
export class Comp {}
|
||||
`);
|
||||
env.write('node_modules/@angular/router/index.d.ts', `
|
||||
import {\u0275\u0275ComponentDefWithMeta, ModuleWithProviders, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔComponentDefWithMeta, ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class RouterComp {
|
||||
static ngComponentDef: \u0275\u0275ComponentDefWithMeta<RouterComp, "lib-cmp", never, {}, {}, never>
|
||||
static ngComponentDef: ΔComponentDefWithMeta<RouterComp, "lib-cmp", never, {}, {}, never>
|
||||
}
|
||||
|
||||
declare class RouterModule {
|
||||
static forRoot(): ModuleWithProviders<RouterModule>;
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<RouterModule, [typeof RouterComp], never, [typeof RouterComp]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, [typeof RouterComp], never, [typeof RouterComp]>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -573,7 +564,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275defineInjector({ factory: function TestModule_Factory(t) ' +
|
||||
'i0.ΔdefineInjector({ factory: function TestModule_Factory(t) ' +
|
||||
'{ return new (t || TestModule)(); }, imports: [[OtherModule, RouterModule.forRoot()],' +
|
||||
'\n OtherModule,\n RouterModule] });');
|
||||
});
|
||||
@ -605,18 +596,18 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275defineNgModule({ type: TestModule });');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
`TestModule.ngInjectorDef = i0.\u0275\u0275defineInjector({ factory: ` +
|
||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||
`Token, useValue: 'test' }], imports: [[OtherModule]] });`);
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.\u0275\u0275NgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.\u0275\u0275InjectorDef');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
||||
});
|
||||
|
||||
it('should compile NgModules with factory providers without errors', () => {
|
||||
@ -646,18 +637,18 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275defineNgModule({ type: TestModule });');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
`TestModule.ngInjectorDef = i0.\u0275\u0275defineInjector({ factory: ` +
|
||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||
`Token, useFactory: function () { return new Token(); } }], imports: [[OtherModule]] });`);
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.\u0275\u0275NgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.\u0275\u0275InjectorDef');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
||||
});
|
||||
|
||||
it('should compile NgModules with factory providers and deps without errors', () => {
|
||||
@ -691,18 +682,18 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275defineNgModule({ type: TestModule });');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
`TestModule.ngInjectorDef = i0.\u0275\u0275defineInjector({ factory: ` +
|
||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||
`Token, useFactory: function (dep) { return new Token(dep); }, deps: [Dep] }], imports: [[OtherModule]] });`);
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.\u0275\u0275NgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.\u0275\u0275InjectorDef');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
||||
});
|
||||
|
||||
it('should compile NgModules with references to local components', () => {
|
||||
@ -863,10 +854,9 @@ describe('ngtsc behavioral tests', () => {
|
||||
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'TestPipe.ngPipeDef = i0.\u0275\u0275definePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||
'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: false })');
|
||||
expect(dtsContents)
|
||||
.toContain('static ngPipeDef: i0.\u0275\u0275PipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||
expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||
});
|
||||
|
||||
it('should compile pure Pipes without errors', () => {
|
||||
@ -887,10 +877,9 @@ describe('ngtsc behavioral tests', () => {
|
||||
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'TestPipe.ngPipeDef = i0.\u0275\u0275definePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||
'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: true })');
|
||||
expect(dtsContents)
|
||||
.toContain('static ngPipeDef: i0.\u0275\u0275PipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||
expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||
});
|
||||
|
||||
it('should compile Pipes with dependencies', () => {
|
||||
@ -912,8 +901,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents)
|
||||
.toContain('return new (t || TestPipe)(i0.\u0275\u0275directiveInject(Dep));');
|
||||
expect(jsContents).toContain('return new (t || TestPipe)(i0.ΔdirectiveInject(Dep));');
|
||||
});
|
||||
|
||||
it('should compile Pipes with generic types', () => {
|
||||
@ -933,7 +921,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toContain('TestPipe.ngPipeDef =');
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain('static ngPipeDef: i0.\u0275\u0275PipeDefWithMeta<TestPipe<any>, "test-pipe">;');
|
||||
.toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe<any>, "test-pipe">;');
|
||||
});
|
||||
|
||||
it('should include @Pipes in @NgModule scopes', () => {
|
||||
@ -959,7 +947,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275NgModuleDefWithMeta<TestModule, [typeof TestPipe, typeof TestCmp], never, never>');
|
||||
'i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestPipe, typeof TestCmp], never, never>');
|
||||
});
|
||||
|
||||
describe('empty and missing selectors', () => {
|
||||
@ -1074,7 +1062,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(dtsContents).toContain('ComponentDefWithMeta<TestCmp');
|
||||
expect(dtsContents).toContain('DirectiveDefWithMeta<TestDir');
|
||||
expect(dtsContents).toContain('PipeDefWithMeta<TestPipe');
|
||||
expect(dtsContents).toContain('\u0275\u0275NgModuleDefWithMeta<TestNgModule');
|
||||
expect(dtsContents).toContain('ΔNgModuleDefWithMeta<TestNgModule');
|
||||
|
||||
// Validate that each class's .d.ts declaration also has an injectable definition.
|
||||
expect(dtsContents).toContain('InjectableDef<TestCmp');
|
||||
@ -1299,7 +1287,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.driveMain();
|
||||
expect(env.getContents('test.js')).toContain('i0.\u0275\u0275pureFunction1');
|
||||
expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1');
|
||||
});
|
||||
|
||||
it('should compile array literals inside function arguments', () => {
|
||||
@ -1321,7 +1309,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.driveMain();
|
||||
expect(env.getContents('test.js')).toContain('i0.\u0275\u0275pureFunction1');
|
||||
expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1');
|
||||
});
|
||||
});
|
||||
|
||||
@ -1337,11 +1325,11 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.write('node_modules/router/index.d.ts', `
|
||||
import {ModuleWithProviders, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
declare class RouterModule {
|
||||
static forRoot(): ModuleWithProviders<RouterModule>;
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -1353,8 +1341,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275NgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
.toContain('i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
});
|
||||
|
||||
it('should extract the generic type if it is provided as qualified type name', () => {
|
||||
@ -1379,9 +1366,9 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.write('node_modules/router/internal.d.ts', `
|
||||
import {\u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
export declare class InternalRouterModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<InternalRouterModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<InternalRouterModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -1394,18 +1381,18 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275NgModuleDefWithMeta<TestModule, never, [typeof i1.InternalRouterModule], never>');
|
||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.InternalRouterModule], never>');
|
||||
});
|
||||
|
||||
it('should not reference a constant with a ModuleWithProviders value in ngModuleDef imports',
|
||||
() => {
|
||||
env.tsconfig();
|
||||
env.write('dep.d.ts', `
|
||||
import {ModuleWithProviders, \u0275\u0275NgModuleDefWithMeta as \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class DepModule {
|
||||
static forRoot(arg1: any, arg2: any): ModuleWithProviders<DepModule>;
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<DepModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<DepModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
env.write('test.ts', `
|
||||
@ -1440,13 +1427,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.write('node_modules/router/index.d.ts', `
|
||||
import {ModuleWithProviders, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export interface MyType extends ModuleWithProviders {}
|
||||
|
||||
declare class RouterModule {
|
||||
static forRoot(): (MyType)&{ngModule:RouterModule};
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -1459,7 +1446,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275NgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
});
|
||||
|
||||
it('should unwrap a namespace imported ModuleWithProviders function if a generic type is provided for it',
|
||||
@ -1479,7 +1466,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
|
||||
declare class RouterModule {
|
||||
static forRoot(): core.ModuleWithProviders<RouterModule>;
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -1492,7 +1479,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'i0.\u0275\u0275NgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||
});
|
||||
|
||||
it('should inject special types according to the metadata', () => {
|
||||
@ -1530,7 +1517,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
`factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.\u0275\u0275injectAttribute("test"), i0.\u0275\u0275directiveInject(i0.ChangeDetectorRef), i0.\u0275\u0275directiveInject(i0.ElementRef), i0.\u0275\u0275directiveInject(i0.Injector), i0.\u0275\u0275directiveInject(i0.Renderer2), i0.\u0275\u0275directiveInject(i0.TemplateRef), i0.\u0275\u0275directiveInject(i0.ViewContainerRef)); }`);
|
||||
`factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.ΔinjectAttribute("test"), i0.ΔdirectiveInject(i0.ChangeDetectorRef), i0.ΔdirectiveInject(i0.ElementRef), i0.ΔdirectiveInject(i0.Injector), i0.ΔdirectiveInject(i0.Renderer2), i0.ΔdirectiveInject(i0.TemplateRef), i0.ΔdirectiveInject(i0.ViewContainerRef)); }`);
|
||||
});
|
||||
|
||||
it('should generate queries for components', () => {
|
||||
@ -1560,9 +1547,9 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toMatch(varRegExp('test1'));
|
||||
expect(jsContents).toMatch(varRegExp('test2'));
|
||||
expect(jsContents).toMatch(varRegExp('accessor'));
|
||||
// match `i0.\u0275\u0275contentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||
// match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
||||
// match `i0.\u0275\u0275viewQuery(_c2, true, null)`
|
||||
// match `i0.ΔviewQuery(_c2, true, null)`
|
||||
expect(jsContents).toMatch(viewQueryRegExp(true));
|
||||
});
|
||||
|
||||
@ -1592,10 +1579,10 @@ describe('ngtsc behavioral tests', () => {
|
||||
expect(jsContents).toMatch(varRegExp('test1'));
|
||||
expect(jsContents).toMatch(varRegExp('test2'));
|
||||
expect(jsContents).toMatch(varRegExp('accessor'));
|
||||
// match `i0.\u0275\u0275contentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||
// match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
||||
|
||||
// match `i0.\u0275\u0275viewQuery(_c2, true, null)`
|
||||
// match `i0.ΔviewQuery(_c2, true, null)`
|
||||
// Note that while ViewQuery doesn't necessarily make sense on a directive, because it doesn't
|
||||
// have a view, we still need to handle it because a component could extend the directive.
|
||||
expect(jsContents).toMatch(viewQueryRegExp(true));
|
||||
@ -1621,11 +1608,11 @@ describe('ngtsc behavioral tests', () => {
|
||||
|
||||
env.driveMain();
|
||||
const jsContents = env.getContents('test.js');
|
||||
// match `i0.\u0275\u0275contentQuery(dirIndex, TemplateRef, true, null)`
|
||||
// match `i0.ΔcontentQuery(dirIndex, TemplateRef, true, null)`
|
||||
expect(jsContents).toMatch(contentQueryRegExp('TemplateRef', true));
|
||||
// match `i0.\u0275\u0275contentQuery(dirIndex, ViewContainerRef, true, null)`
|
||||
// match `i0.ΔcontentQuery(dirIndex, ViewContainerRef, true, null)`
|
||||
expect(jsContents).toMatch(contentQueryRegExp('ViewContainerRef', true));
|
||||
// match `i0.\u0275\u0275contentQuery(dirIndex, _c0, true, null)`
|
||||
// match `i0.ΔcontentQuery(dirIndex, _c0, true, null)`
|
||||
expect(jsContents).toContain('_c0 = ["parens"];');
|
||||
expect(jsContents).toMatch(contentQueryRegExp('_c0', true));
|
||||
});
|
||||
@ -1675,9 +1662,9 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275listener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); });
|
||||
i0.\u0275\u0275listener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.\u0275\u0275resolveDocument);
|
||||
i0.\u0275\u0275listener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.\u0275\u0275resolveWindow);
|
||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); });
|
||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.ΔresolveDocument);
|
||||
i0.Δlistener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.ΔresolveWindow);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -1773,17 +1760,17 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275allocHostVars(2);
|
||||
i0.\u0275\u0275listener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); });
|
||||
i0.\u0275\u0275listener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.\u0275\u0275resolveBody);
|
||||
i0.\u0275\u0275listener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); });
|
||||
i0.\u0275\u0275styling(_c0);
|
||||
i0.ΔallocHostVars(2);
|
||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); });
|
||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.ΔresolveBody);
|
||||
i0.Δlistener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); });
|
||||
i0.Δstyling(_c0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "hello", i0.\u0275\u0275bind(ctx.foo));
|
||||
i0.\u0275\u0275property("prop", ctx.bar, null, true);
|
||||
i0.\u0275\u0275classProp(0, ctx.someClass);
|
||||
i0.\u0275\u0275stylingApply();
|
||||
i0.ΔelementAttribute(elIndex, "hello", i0.Δbind(ctx.foo));
|
||||
i0.Δproperty("prop", ctx.bar, null, true);
|
||||
i0.ΔclassProp(0, ctx.someClass);
|
||||
i0.ΔstylingApply();
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -1812,7 +1799,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
env.driveMain();
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275elementHostAttrs(["test", test])');
|
||||
expect(jsContents).toContain('i0.ΔelementHostAttrs(["test", test])');
|
||||
});
|
||||
|
||||
it('should accept enum values as host bindings', () => {
|
||||
@ -1837,7 +1824,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
|
||||
env.driveMain();
|
||||
expect(env.getContents('test.js')).toContain('"hello", i0.\u0275\u0275bind(ctx.foo)');
|
||||
expect(env.getContents('test.js')).toContain('"hello", i0.Δbind(ctx.foo)');
|
||||
});
|
||||
|
||||
it('should generate host listeners for directives within hostBindings section', () => {
|
||||
@ -1859,7 +1846,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function Dir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275listener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); });
|
||||
i0.Δlistener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); });
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -2054,7 +2041,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
`);
|
||||
env.driveMain();
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).not.toContain('i0.\u0275\u0275elementProperty');
|
||||
expect(jsContents).not.toContain('i0.ΔelementProperty');
|
||||
});
|
||||
|
||||
it('should correctly recognize local symbols', () => {
|
||||
@ -2309,10 +2296,8 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'function Base_Factory(t) { return new (t || Base)(i0.\u0275\u0275inject(Dep)); }');
|
||||
expect(jsContents)
|
||||
.toContain('var \u0275Child_BaseFactory = i0.\u0275\u0275getInheritedFactory(Child)');
|
||||
.toContain('function Base_Factory(t) { return new (t || Base)(i0.Δinject(Dep)); }');
|
||||
expect(jsContents).toContain('var \u0275Child_BaseFactory = i0.ΔgetInheritedFactory(Child)');
|
||||
expect(jsContents)
|
||||
.toContain('function Child_Factory(t) { return \u0275Child_BaseFactory((t || Child)); }');
|
||||
expect(jsContents)
|
||||
@ -2337,8 +2322,7 @@ describe('ngtsc behavioral tests', () => {
|
||||
env.driveMain();
|
||||
const jsContents = env.getContents('test.js');
|
||||
|
||||
expect(jsContents)
|
||||
.toContain('var \u0275Dir_BaseFactory = i0.\u0275\u0275getInheritedFactory(Dir)');
|
||||
expect(jsContents).toContain('var \u0275Dir_BaseFactory = i0.ΔgetInheritedFactory(Dir)');
|
||||
});
|
||||
|
||||
it('should wrap "directives" in component metadata in a closure when forward references are present',
|
||||
@ -2479,8 +2463,8 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = trim(env.getContents('test.js'));
|
||||
expect(jsContents).toContain(`import Default from './types';`);
|
||||
expect(jsContents).toContain(`import * as i1 from "./types";`);
|
||||
expect(jsContents).toContain('i0.\u0275\u0275directiveInject(Default)');
|
||||
expect(jsContents).toContain('i0.\u0275\u0275directiveInject(i1.Other)');
|
||||
expect(jsContents).toContain('i0.ΔdirectiveInject(Default)');
|
||||
expect(jsContents).toContain('i0.ΔdirectiveInject(i1.Other)');
|
||||
expect(jsContents).toMatch(setClassMetadataRegExp('type: Default'));
|
||||
expect(jsContents).toMatch(setClassMetadataRegExp('type: i1.Other'));
|
||||
});
|
||||
@ -2591,8 +2575,8 @@ describe('ngtsc behavioral tests', () => {
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents)
|
||||
.toMatch(
|
||||
/i\d\.\u0275\u0275setComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/);
|
||||
expect(jsContents).not.toContain('/*__PURE__*/ i0.\u0275\u0275setComponentScope');
|
||||
/i\d\.ΔsetComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/);
|
||||
expect(jsContents).not.toContain('/*__PURE__*/ i0.ΔsetComponentScope');
|
||||
});
|
||||
|
||||
it('should detect a cycle added entirely during compilation', () => {
|
||||
@ -2783,14 +2767,14 @@ describe('ngtsc behavioral tests', () => {
|
||||
it('should not emit multiple references to the same directive', () => {
|
||||
env.tsconfig();
|
||||
env.write('node_modules/external/index.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class ExternalDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
}
|
||||
|
||||
export declare class ExternalModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
}
|
||||
`);
|
||||
env.write('test.ts', `
|
||||
@ -2819,19 +2803,19 @@ describe('ngtsc behavioral tests', () => {
|
||||
it('should import directives by their external name', () => {
|
||||
env.tsconfig();
|
||||
env.write('node_modules/external/index.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
import {InternalDir} from './internal';
|
||||
|
||||
export {InternalDir as ExternalDir} from './internal';
|
||||
|
||||
export declare class ExternalModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<ExternalModule, [typeof InternalDir], never, [typeof InternalDir]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof InternalDir], never, [typeof InternalDir]>;
|
||||
}
|
||||
`);
|
||||
env.write('node_modules/external/internal.d.ts', `
|
||||
|
||||
export declare class InternalDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<InternalDir, '[test]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<InternalDir, '[test]', never, never, never, never>;
|
||||
}
|
||||
`);
|
||||
env.write('test.ts', `
|
||||
@ -3040,14 +3024,14 @@ describe('ngtsc behavioral tests', () => {
|
||||
export class Module {}
|
||||
`);
|
||||
env.write('node_modules/external/index.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class ExternalDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
}
|
||||
|
||||
export declare class ExternalModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -3227,15 +3211,15 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function UnsafeAttrsDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275allocHostVars(6);
|
||||
i0.ΔallocHostVars(6);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "href", i0.\u0275\u0275bind(ctx.attrHref), i0.\u0275\u0275sanitizeUrlOrResourceUrl);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "src", i0.\u0275\u0275bind(ctx.attrSrc), i0.\u0275\u0275sanitizeUrlOrResourceUrl);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "action", i0.\u0275\u0275bind(ctx.attrAction), i0.\u0275\u0275sanitizeUrl);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "profile", i0.\u0275\u0275bind(ctx.attrProfile), i0.\u0275\u0275sanitizeResourceUrl);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "innerHTML", i0.\u0275\u0275bind(ctx.attrInnerHTML), i0.\u0275\u0275sanitizeHtml);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "title", i0.\u0275\u0275bind(ctx.attrSafeTitle));
|
||||
i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.attrHref), i0.ΔsanitizeUrlOrResourceUrl);
|
||||
i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.attrSrc), i0.ΔsanitizeUrlOrResourceUrl);
|
||||
i0.ΔelementAttribute(elIndex, "action", i0.Δbind(ctx.attrAction), i0.ΔsanitizeUrl);
|
||||
i0.ΔelementAttribute(elIndex, "profile", i0.Δbind(ctx.attrProfile), i0.ΔsanitizeResourceUrl);
|
||||
i0.ΔelementAttribute(elIndex, "innerHTML", i0.Δbind(ctx.attrInnerHTML), i0.ΔsanitizeHtml);
|
||||
i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.attrSafeTitle));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -3282,15 +3266,15 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function UnsafePropsDirective_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275allocHostVars(6);
|
||||
i0.ΔallocHostVars(6);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.\u0275\u0275property("href", ctx.propHref, i0.\u0275\u0275sanitizeUrlOrResourceUrl, true);
|
||||
i0.\u0275\u0275property("src", ctx.propSrc, i0.\u0275\u0275sanitizeUrlOrResourceUrl, true);
|
||||
i0.\u0275\u0275property("action", ctx.propAction, i0.\u0275\u0275sanitizeUrl, true);
|
||||
i0.\u0275\u0275property("profile", ctx.propProfile, i0.\u0275\u0275sanitizeResourceUrl, true);
|
||||
i0.\u0275\u0275property("innerHTML", ctx.propInnerHTML, i0.\u0275\u0275sanitizeHtml, true);
|
||||
i0.\u0275\u0275property("title", ctx.propSafeTitle, null, true);
|
||||
i0.Δproperty("href", ctx.propHref, i0.ΔsanitizeUrlOrResourceUrl, true);
|
||||
i0.Δproperty("src", ctx.propSrc, i0.ΔsanitizeUrlOrResourceUrl, true);
|
||||
i0.Δproperty("action", ctx.propAction, i0.ΔsanitizeUrl, true);
|
||||
i0.Δproperty("profile", ctx.propProfile, i0.ΔsanitizeResourceUrl, true);
|
||||
i0.Δproperty("innerHTML", ctx.propInnerHTML, i0.ΔsanitizeHtml, true);
|
||||
i0.Δproperty("title", ctx.propSafeTitle, null, true);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -3322,15 +3306,15 @@ describe('ngtsc behavioral tests', () => {
|
||||
const hostBindingsFn = `
|
||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
i0.\u0275\u0275allocHostVars(6);
|
||||
i0.ΔallocHostVars(6);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.\u0275\u0275property("src", ctx.srcProp, null, true);
|
||||
i0.\u0275\u0275property("href", ctx.hrefProp, null, true);
|
||||
i0.\u0275\u0275property("title", ctx.titleProp, null, true);
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "src", i0.\u0275\u0275bind(ctx.srcAttr));
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "href", i0.\u0275\u0275bind(ctx.hrefAttr));
|
||||
i0.\u0275\u0275elementAttribute(elIndex, "title", i0.\u0275\u0275bind(ctx.titleAttr));
|
||||
i0.Δproperty("src", ctx.srcProp, null, true);
|
||||
i0.Δproperty("href", ctx.hrefProp, null, true);
|
||||
i0.Δproperty("title", ctx.titleProp, null, true);
|
||||
i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.srcAttr));
|
||||
i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.hrefAttr));
|
||||
i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.titleAttr));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -3360,13 +3344,13 @@ describe('ngtsc behavioral tests', () => {
|
||||
beforeEach(() => {
|
||||
env.tsconfig();
|
||||
env.write('node_modules/@angular/router/index.d.ts', `
|
||||
import {ModuleWithProviders, \u0275\u0275NgModuleDefWithMeta as \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare var ROUTES;
|
||||
export declare class RouterModule {
|
||||
static forRoot(arg1: any, arg2: any): ModuleWithProviders<RouterModule>;
|
||||
static forChild(arg1: any): ModuleWithProviders<RouterModule>;
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||
}
|
||||
`);
|
||||
});
|
||||
@ -3996,24 +3980,24 @@ export const Foo = Foo__PRE_R3__;
|
||||
|
||||
// 'alpha' declares the directive which will ultimately be imported.
|
||||
env.write('alpha.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class ExternalDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
}
|
||||
|
||||
export declare class AlphaModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<AlphaModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<AlphaModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||
}
|
||||
`);
|
||||
|
||||
// 'beta' re-exports AlphaModule from alpha.
|
||||
env.write('beta.d.ts', `
|
||||
import {\u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
import {AlphaModule} from './alpha';
|
||||
|
||||
export declare class BetaModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<AlphaModule, never, never, [typeof AlphaModule]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<AlphaModule, never, never, [typeof AlphaModule]>;
|
||||
}
|
||||
`);
|
||||
|
||||
@ -4045,26 +4029,26 @@ export const Foo = Foo__PRE_R3__;
|
||||
it('should write alias ES2015 exports for NgModule exported directives', () => {
|
||||
env.tsconfig({'_useHostForImportGeneration': true});
|
||||
env.write('external.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
import {LibModule} from './lib';
|
||||
|
||||
export declare class ExternalDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||
}
|
||||
|
||||
export declare class ExternalModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir, typeof LibModule]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir, typeof LibModule]>;
|
||||
}
|
||||
`);
|
||||
env.write('lib.d.ts', `
|
||||
import {\u0275\u0275DirectiveDefWithMeta, \u0275\u0275NgModuleDefWithMeta} from '@angular/core';
|
||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
||||
|
||||
export declare class LibDir {
|
||||
static ngDirectiveDef: \u0275\u0275DirectiveDefWithMeta<LibDir, '[lib]', never, never, never, never>;
|
||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<LibDir, '[lib]', never, never, never, never>;
|
||||
}
|
||||
|
||||
export declare class LibModule {
|
||||
static ngModuleDef: \u0275\u0275NgModuleDefWithMeta<LibModule, [typeof LibDir], never, [typeof LibDir]>;
|
||||
static ngModuleDef: ΔNgModuleDefWithMeta<LibModule, [typeof LibDir], never, [typeof LibDir]>;
|
||||
}
|
||||
`);
|
||||
env.write('foo.ts', `
|
||||
|
@ -36,15 +36,15 @@ describe('ngtsc module scopes', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { imports: [OtherModule] });');
|
||||
'/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { imports: [OtherModule] });');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof OtherModule], never>');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof OtherModule], never>');
|
||||
});
|
||||
|
||||
it('should produce an error when an invalid class is imported', () => {
|
||||
@ -98,15 +98,15 @@ describe('ngtsc module scopes', () => {
|
||||
env.driveMain();
|
||||
|
||||
const jsContents = env.getContents('test.js');
|
||||
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
||||
expect(jsContents)
|
||||
.toContain(
|
||||
'/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { exports: [OtherModule] });');
|
||||
'/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { exports: [OtherModule] });');
|
||||
|
||||
const dtsContents = env.getContents('test.d.ts');
|
||||
expect(dtsContents)
|
||||
.toContain(
|
||||
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, never, never, [typeof OtherModule]>');
|
||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, never, never, [typeof OtherModule]>');
|
||||
});
|
||||
|
||||
it('should produce an error when a non-NgModule class is exported', () => {
|
||||
|
@ -23,17 +23,17 @@ describe('template source-mapping', () => {
|
||||
it('should map simple element with content', () => {
|
||||
const mappings = compileAndMap('<h1>Heading 1</h1>');
|
||||
expect(mappings).toContain(
|
||||
{source: '<h1>', generated: 'i0.ɵɵelementStart(0, "h1")', sourceUrl: '../test.ts'});
|
||||
{source: '<h1>', generated: 'i0.ΔelementStart(0, "h1")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: 'Heading 1', generated: 'i0.ɵɵtext(1, "Heading 1")', sourceUrl: '../test.ts'});
|
||||
{source: 'Heading 1', generated: 'i0.Δtext(1, "Heading 1")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '</h1>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</h1>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map void element', () => {
|
||||
const mappings = compileAndMap('<hr>');
|
||||
expect(mappings).toContain(
|
||||
{source: '<hr>', generated: 'i0.ɵɵelement(0, "hr")', sourceUrl: '../test.ts'});
|
||||
{source: '<hr>', generated: 'i0.Δelement(0, "hr")', sourceUrl: '../test.ts'});
|
||||
});
|
||||
});
|
||||
|
||||
@ -41,40 +41,40 @@ describe('template source-mapping', () => {
|
||||
it('should map a mix of interpolated and static content', () => {
|
||||
const mappings = compileAndMap('<h3>Hello {{ name }}</h3>');
|
||||
expect(mappings).toContain(
|
||||
{source: '<h3>', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||
{source: '<h3>', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
source: 'Hello {{ name }}',
|
||||
generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("Hello ", ctx.name, ""))',
|
||||
generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("Hello ", ctx.name, ""))',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: '</h3>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</h3>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map a complex interpolated expression', () => {
|
||||
const mappings = compileAndMap('<h2>{{ greeting + " " + name }}</h2>');
|
||||
expect(mappings).toContain(
|
||||
{source: '<h2>', generated: 'i0.ɵɵelementStart(0, "h2")', sourceUrl: '../test.ts'});
|
||||
{source: '<h2>', generated: 'i0.ΔelementStart(0, "h2")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
source: '{{ greeting + " " + name }}',
|
||||
generated:
|
||||
'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))',
|
||||
'i0.ΔtextBinding(1, i0.Δinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: '</h2>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</h2>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map interpolated properties', () => {
|
||||
const mappings = compileAndMap('<div id="{{name}}"></div>');
|
||||
expect(mappings).toContain({
|
||||
source: '<div id="{{name}}"></div>',
|
||||
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||
generated: 'i0.Δelement(0, "div", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: 'id="{{name}}"',
|
||||
generated: 'i0.ɵɵpropertyInterpolate("id", ctx.name)',
|
||||
generated: 'i0.ΔpropertyInterpolate("id", ctx.name)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -82,15 +82,15 @@ describe('template source-mapping', () => {
|
||||
it('should map interpolation with pipe', () => {
|
||||
const mappings = compileAndMap('<div>{{200.3 | percent : 2 }}</div>');
|
||||
expect(mappings).toContain(
|
||||
{source: '<div>', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||
{source: '<div>', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
source: '{{200.3 | percent : 2 }}',
|
||||
generated:
|
||||
'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", i0.ɵɵpipeBind2(2, 1, 200.3, 2), ""))',
|
||||
'i0.ΔtextBinding(1, i0.Δinterpolation1("", i0.ΔpipeBind2(2, 1, 200.3, 2), ""))',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
});
|
||||
|
||||
@ -99,12 +99,12 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('<div [attr]="name"></div>');
|
||||
expect(mappings).toContain({
|
||||
source: '<div [attr]="name"></div>',
|
||||
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||
generated: 'i0.Δelement(0, "div", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: '[attr]="name"',
|
||||
generated: 'i0.ɵɵproperty("attr", ctx.name)',
|
||||
generated: 'i0.Δproperty("attr", ctx.name)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -114,12 +114,12 @@ describe('template source-mapping', () => {
|
||||
|
||||
expect(mappings).toContain({
|
||||
source: '<div [attr]="greeting + name"></div>',
|
||||
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||
generated: 'i0.Δelement(0, "div", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: '[attr]="greeting + name"',
|
||||
generated: 'i0.ɵɵproperty("attr", (ctx.greeting + ctx.name))',
|
||||
generated: 'i0.Δproperty("attr", (ctx.greeting + ctx.name))',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -128,12 +128,12 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('<div bind-attr="name"></div>');
|
||||
expect(mappings).toContain({
|
||||
source: '<div bind-attr="name"></div>',
|
||||
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||
generated: 'i0.Δelement(0, "div", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: 'bind-attr="name"',
|
||||
generated: 'i0.ɵɵproperty("attr", ctx.name)',
|
||||
generated: 'i0.Δproperty("attr", ctx.name)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -142,15 +142,15 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('<button (click)="doSomething()">Do it</button>');
|
||||
expect(mappings).toContain({
|
||||
source: '<button (click)="doSomething()">',
|
||||
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: 'Do it', generated: 'i0.ɵɵtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||
{source: 'Do it', generated: 'i0.Δtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map a complex output binding expression', () => {
|
||||
@ -158,11 +158,11 @@ describe('template source-mapping', () => {
|
||||
compileAndMap(`<button (click)="items.push('item' + items.length)">Add Item</button>`);
|
||||
expect(mappings).toContain({
|
||||
source: `<button (click)="items.push('item' + items.length)">`,
|
||||
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: 'Add Item', generated: 'i0.ɵɵtext(1, "Add Item")', sourceUrl: '../test.ts'});
|
||||
{source: 'Add Item', generated: 'i0.Δtext(1, "Add Item")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: 'items.push(', generated: 'ctx.items.push((', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
@ -173,41 +173,41 @@ describe('template source-mapping', () => {
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map a longhand output binding expression', () => {
|
||||
const mappings = compileAndMap('<button on-click="doSomething()">Do it</button>');
|
||||
expect(mappings).toContain({
|
||||
source: '<button on-click="doSomething()">',
|
||||
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: 'Do it', generated: 'i0.ɵɵtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||
{source: 'Do it', generated: 'i0.Δtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
|
||||
it('should map a two-way binding expression', () => {
|
||||
const mappings = compileAndMap('Name: <input [(ngModel)]="name">');
|
||||
expect(mappings).toContain({
|
||||
source: '<input [(ngModel)]="name">',
|
||||
generated: 'i0.ɵɵelementStart(1, "input", _c0)',
|
||||
generated: 'i0.ΔelementStart(1, "input", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
// TODO: improve mappings here
|
||||
expect(mappings).toContain({
|
||||
source: '[(ngModel)]="name"',
|
||||
generated:
|
||||
'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||
'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: '<input [(ngModel)]="name">',
|
||||
generated: 'i0.ɵɵelementEnd()',
|
||||
generated: 'i0.ΔelementEnd()',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -216,19 +216,19 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('Name: <input bindon-ngModel="name">');
|
||||
expect(mappings).toContain({
|
||||
source: '<input bindon-ngModel="name">',
|
||||
generated: 'i0.ɵɵelementStart(1, "input", _c0)',
|
||||
generated: 'i0.ΔelementStart(1, "input", _c0)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
// TODO: improve mappings here
|
||||
expect(mappings).toContain({
|
||||
source: 'bindon-ngModel="name"',
|
||||
generated:
|
||||
'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||
'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
source: '<input bindon-ngModel="name">',
|
||||
generated: 'i0.ɵɵelementEnd()',
|
||||
generated: 'i0.ΔelementEnd()',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
});
|
||||
@ -237,17 +237,17 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('<div [class.initial]="isInitial">Message</div>');
|
||||
expect(mappings).toContain({
|
||||
source: '<div [class.initial]="isInitial">',
|
||||
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||
generated: 'i0.ΔelementStart(0, "div")',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
|
||||
// TODO: Add better mappings for binding
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: 'Message', generated: 'i0.ɵɵtext(1, "Message")', sourceUrl: '../test.ts'});
|
||||
{source: 'Message', generated: 'i0.Δtext(1, "Message")', sourceUrl: '../test.ts'});
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
});
|
||||
|
||||
@ -257,20 +257,20 @@ describe('template source-mapping', () => {
|
||||
|
||||
expect(mappings).toContain({
|
||||
source: '<div *ngIf="showMessage()">',
|
||||
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||
generated: 'i0.ΔelementStart(0, "div")',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
|
||||
// TODO - map the bindings better
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
|
||||
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
||||
|
||||
// expect(mappings).toContain({
|
||||
// source: '{{ name }}',
|
||||
// generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))',
|
||||
// generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))',
|
||||
// sourceUrl: '../test.ts'
|
||||
// });
|
||||
});
|
||||
@ -283,18 +283,18 @@ describe('template source-mapping', () => {
|
||||
`</ng-template>`);
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '<div>', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||
{source: '<div>', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||
|
||||
// TODO - map the bindings better
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
|
||||
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
||||
|
||||
// expect(mappings).toContain({
|
||||
// source: '{{ name }}',
|
||||
// generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))',
|
||||
// generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))',
|
||||
// sourceUrl: '../test.ts'
|
||||
// });
|
||||
});
|
||||
@ -305,14 +305,14 @@ describe('template source-mapping', () => {
|
||||
|
||||
expect(mappings).toContain({
|
||||
source: '<div *ngFor="let item of items; index as i; trackBy: trackByFn">',
|
||||
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||
generated: 'i0.ΔelementStart(0, "div")',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
|
||||
// TODO - map the bindings better
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
|
||||
});
|
||||
|
||||
@ -331,20 +331,20 @@ describe('template source-mapping', () => {
|
||||
`<div><ng-content></ng-content></div>`);
|
||||
|
||||
expect(mappings).toContain(
|
||||
{source: '<h3>', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||
{source: '<h3>', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
source: '<ng-content select="title">',
|
||||
generated: 'i0.ɵɵprojection(1, 1)',
|
||||
generated: 'i0.Δprojection(1, 1)',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{source: '</h3>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</h3>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '<div>', generated: 'i0.ɵɵelementStart(2, "div")', sourceUrl: '../test.ts'});
|
||||
{source: '<div>', generated: 'i0.ΔelementStart(2, "div")', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '<ng-content>', generated: 'i0.ɵɵprojection(3)', sourceUrl: '../test.ts'});
|
||||
{source: '<ng-content>', generated: 'i0.Δprojection(3)', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
||||
});
|
||||
});
|
||||
|
||||
@ -353,24 +353,24 @@ describe('template source-mapping', () => {
|
||||
|
||||
// Creation mode
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||
generated: 'i0.Δtext(1, "this is a test")',
|
||||
source: 'this is a test',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
|
||||
// Update mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
||||
source: '{{ 1 + 2 }}',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
@ -381,24 +381,24 @@ describe('template source-mapping', () => {
|
||||
|
||||
// Creation mode
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||
generated: 'i0.Δtext(1, "this is a test")',
|
||||
source: 'this is a test',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||
|
||||
// Update mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
||||
source: '{{ 1 + 2 }}',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
@ -410,7 +410,7 @@ describe('template source-mapping', () => {
|
||||
const mappings = compileAndMap('<div class=\\"some-class\\">this is a test</div>');
|
||||
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementStart(0, "div", _c0)',
|
||||
generated: 'i0.ΔelementStart(0, "div", _c0)',
|
||||
source: '<div class=\\"some-class\\">',
|
||||
sourceUrl: '../test.ts'
|
||||
});
|
||||
@ -429,30 +429,30 @@ describe('template source-mapping', () => {
|
||||
|
||||
// Creation mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||
generated: 'i0.ΔelementStart(0, "div")',
|
||||
source: '<div>',
|
||||
sourceUrl: '../dir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||
generated: 'i0.Δtext(1, "this is a test")',
|
||||
source: 'this is a test',
|
||||
sourceUrl: '../dir/test.html'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementStart(2, "div")',
|
||||
generated: 'i0.ΔelementStart(2, "div")',
|
||||
source: '<div>',
|
||||
sourceUrl: '../dir/test.html'
|
||||
});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'});
|
||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'});
|
||||
expect(mappings).toContain(
|
||||
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||
|
||||
// Update mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
||||
source: '{{ 1 + 2 }}',
|
||||
sourceUrl: '../dir/test.html'
|
||||
});
|
||||
@ -464,39 +464,39 @@ describe('template source-mapping', () => {
|
||||
|
||||
// Creation mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||
generated: 'i0.ΔelementStart(0, "div")',
|
||||
source: '<div>',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||
generated: 'i0.Δtext(1, "this is a test")',
|
||||
source: 'this is a test',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementEnd()',
|
||||
generated: 'i0.ΔelementEnd()',
|
||||
source: '</div>',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementStart(2, "div")',
|
||||
generated: 'i0.ΔelementStart(2, "div")',
|
||||
source: '<div>',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtext(3)',
|
||||
generated: 'i0.Δtext(3)',
|
||||
source: '{{ 1 + 2 }}',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵelementEnd()',
|
||||
generated: 'i0.ΔelementEnd()',
|
||||
source: '</div>',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
|
||||
// Update mode
|
||||
expect(mappings).toContain({
|
||||
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
||||
source: '{{ 1 + 2 }}',
|
||||
sourceUrl: '../extraRootDir/test.html'
|
||||
});
|
||||
|
@ -34,17 +34,17 @@ export declare class IndexPipe {
|
||||
export declare class NgForOf<T> {
|
||||
ngForOf: T[];
|
||||
static ngTemplateContextGuard<T>(dir: NgForOf<T>, ctx: any): ctx is NgForOfContext<T>;
|
||||
static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta<NgForOf<any>, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>;
|
||||
static ngDirectiveDef: i0.ΔDirectiveDefWithMeta<NgForOf<any>, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>;
|
||||
}
|
||||
|
||||
export declare class NgIf {
|
||||
ngIf: any;
|
||||
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E>
|
||||
static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta<NgForOf<any>, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>;
|
||||
static ngDirectiveDef: i0.ΔDirectiveDefWithMeta<NgForOf<any>, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>;
|
||||
}
|
||||
|
||||
export declare class CommonModule {
|
||||
static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<CommonModule, [typeof NgIf, typeof NgForOf, typeof IndexPipe], never, [typeof NgIf, typeof NgForOf, typeof IndexPipe]>;
|
||||
static ngModuleDef: i0.ΔNgModuleDefWithMeta<CommonModule, [typeof NgIf, typeof NgForOf, typeof IndexPipe], never, [typeof NgIf, typeof NgForOf, typeof IndexPipe]>;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user