refactor(core): remove deprecated ɵɵselect
instruction (#38733)
This instruction was deprecated in 664e0015d4de720216c52b13b808f9ba41b7da38 and is no longer referenced in any meaningful way, so it can be removed. PR Close #38733
This commit is contained in:
parent
926ffcd8ac
commit
83ace4ed30
@ -29,7 +29,6 @@ export class Identifiers {
|
|||||||
|
|
||||||
static elementEnd: o.ExternalReference = {name: 'ɵɵelementEnd', moduleName: CORE};
|
static elementEnd: o.ExternalReference = {name: 'ɵɵelementEnd', moduleName: CORE};
|
||||||
|
|
||||||
static select: o.ExternalReference = {name: 'ɵɵselect', moduleName: CORE};
|
|
||||||
static advance: o.ExternalReference = {name: 'ɵɵadvance', moduleName: CORE};
|
static advance: o.ExternalReference = {name: 'ɵɵadvance', moduleName: CORE};
|
||||||
|
|
||||||
static syntheticHostProperty:
|
static syntheticHostProperty:
|
||||||
|
@ -201,7 +201,6 @@ export {
|
|||||||
ɵɵresolveWindow,
|
ɵɵresolveWindow,
|
||||||
ɵɵrestoreView,
|
ɵɵrestoreView,
|
||||||
|
|
||||||
ɵɵselect,
|
|
||||||
ɵɵsetComponentScope,
|
ɵɵsetComponentScope,
|
||||||
ɵɵsetNgModuleScope,
|
ɵɵsetNgModuleScope,
|
||||||
ɵɵstaticContentQuery,
|
ɵɵstaticContentQuery,
|
||||||
|
@ -88,8 +88,6 @@ export {
|
|||||||
|
|
||||||
ɵɵreference,
|
ɵɵreference,
|
||||||
|
|
||||||
// TODO: remove `select` once we've refactored all of the tests not to use it.
|
|
||||||
ɵɵselect,
|
|
||||||
ɵɵstyleMap,
|
ɵɵstyleMap,
|
||||||
ɵɵstyleMapInterpolate1,
|
ɵɵstyleMapInterpolate1,
|
||||||
ɵɵstyleMapInterpolate2,
|
ɵɵstyleMapInterpolate2,
|
||||||
|
@ -39,16 +39,6 @@ export function ɵɵadvance(delta: number): void {
|
|||||||
selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, getCheckNoChangesMode());
|
selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, getCheckNoChangesMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Selects an element for later binding instructions.
|
|
||||||
* @deprecated No longer being generated, but still used in unit tests.
|
|
||||||
* @codeGenApi
|
|
||||||
*/
|
|
||||||
export function ɵɵselect(index: number): void {
|
|
||||||
// TODO(misko): Remove this function as it is no longer being used.
|
|
||||||
selectIndexInternal(getTView(), getLView(), index, getCheckNoChangesMode());
|
|
||||||
}
|
|
||||||
|
|
||||||
export function selectIndexInternal(
|
export function selectIndexInternal(
|
||||||
tView: TView, lView: LView, index: number, checkNoChangesMode: boolean) {
|
tView: TView, lView: LView, index: number, checkNoChangesMode: boolean) {
|
||||||
ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
|
ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
|
||||||
|
@ -134,7 +134,6 @@ export const angularCoreEnv: {[name: string]: Function} =
|
|||||||
'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,
|
'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,
|
||||||
'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,
|
'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,
|
||||||
'ɵɵclassProp': r3.ɵɵclassProp,
|
'ɵɵclassProp': r3.ɵɵclassProp,
|
||||||
'ɵɵselect': r3.ɵɵselect,
|
|
||||||
'ɵɵadvance': r3.ɵɵadvance,
|
'ɵɵadvance': r3.ɵɵadvance,
|
||||||
'ɵɵtemplate': r3.ɵɵtemplate,
|
'ɵɵtemplate': r3.ɵɵtemplate,
|
||||||
'ɵɵtext': r3.ɵɵtext,
|
'ɵɵtext': r3.ɵɵtext,
|
||||||
|
@ -10,7 +10,7 @@ import {NgForOfContext} from '@angular/common';
|
|||||||
import {getSortedClassName} from '@angular/core/testing/src/styling';
|
import {getSortedClassName} from '@angular/core/testing/src/styling';
|
||||||
|
|
||||||
import {ɵɵdefineComponent} from '../../src/render3/definition';
|
import {ɵɵdefineComponent} from '../../src/render3/definition';
|
||||||
import {RenderFlags, ɵɵattribute, ɵɵclassMap, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵproperty, ɵɵselect, ɵɵstyleMap, ɵɵstyleProp, ɵɵtemplate, ɵɵtext, ɵɵtextInterpolate1} from '../../src/render3/index';
|
import {RenderFlags, ɵɵadvance, ɵɵattribute, ɵɵclassMap, ɵɵelement, ɵɵelementEnd, ɵɵelementStart, ɵɵproperty, ɵɵstyleMap, ɵɵstyleProp, ɵɵtemplate, ɵɵtext, ɵɵtextInterpolate1} from '../../src/render3/index';
|
||||||
import {AttributeMarker} from '../../src/render3/interfaces/node';
|
import {AttributeMarker} from '../../src/render3/interfaces/node';
|
||||||
import {bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript, bypassSanitizationTrustStyle, bypassSanitizationTrustUrl, getSanitizationBypassType, SafeValue, unwrapSafeValue} from '../../src/sanitization/bypass';
|
import {bypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript, bypassSanitizationTrustStyle, bypassSanitizationTrustUrl, getSanitizationBypassType, SafeValue, unwrapSafeValue} from '../../src/sanitization/bypass';
|
||||||
import {ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl} from '../../src/sanitization/sanitization';
|
import {ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl} from '../../src/sanitization/sanitization';
|
||||||
@ -33,18 +33,18 @@ describe('instructions', () => {
|
|||||||
ɵɵelement(0, 'script');
|
ɵɵelement(0, 'script');
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('ɵɵselect', () => {
|
describe('ɵɵadvance', () => {
|
||||||
it('should error in DevMode if index is out of range', () => {
|
it('should error in DevMode if index is out of range', () => {
|
||||||
// Only one constant added, meaning only index `0` is valid.
|
// Only one constant added, meaning only index `0` is valid.
|
||||||
const t = new TemplateFixture(createDiv, () => {}, 1, 0);
|
const t = new TemplateFixture(createDiv, () => {}, 1, 0);
|
||||||
expect(() => {
|
expect(() => {
|
||||||
t.update(() => {
|
t.update(() => {
|
||||||
ɵɵselect(-1);
|
ɵɵadvance(-1);
|
||||||
});
|
});
|
||||||
}).toThrow();
|
}).toThrow();
|
||||||
expect(() => {
|
expect(() => {
|
||||||
t.update(() => {
|
t.update(() => {
|
||||||
ɵɵselect(1);
|
ɵɵadvance(1);
|
||||||
});
|
});
|
||||||
}).toThrow();
|
}).toThrow();
|
||||||
});
|
});
|
||||||
@ -225,7 +225,7 @@ describe('instructions', () => {
|
|||||||
}
|
}
|
||||||
if (rf & RenderFlags.Update) {
|
if (rf & RenderFlags.Update) {
|
||||||
const row_r2 = ctx0.$implicit;
|
const row_r2 = ctx0.$implicit;
|
||||||
ɵɵselect(1);
|
ɵɵadvance(1);
|
||||||
ɵɵproperty('ngForOf', row_r2);
|
ɵɵproperty('ngForOf', row_r2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ describe('instructions', () => {
|
|||||||
}
|
}
|
||||||
if (rf & RenderFlags.Update) {
|
if (rf & RenderFlags.Update) {
|
||||||
const col_r3 = ctx1.$implicit;
|
const col_r3 = ctx1.$implicit;
|
||||||
ɵɵselect(1);
|
ɵɵadvance(1);
|
||||||
ɵɵtextInterpolate1('', col_r3, '');
|
ɵɵtextInterpolate1('', col_r3, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user