refactor(ivy): remove markDirty from global utilities (#34453)

Removes `markDirty` from the global debugging utilities API since we've already exposed `detectChanges`.

PR Close #34453
This commit is contained in:
Kristiyan Kostadinov 2020-01-13 20:23:35 +01:00 committed by Andrew Kushnir
parent 471375adbe
commit cd9ae66b35
5 changed files with 0 additions and 12 deletions

View File

@ -15,6 +15,5 @@
* file in the public_api_guard test.
*/
export {markDirty} from './instructions/all';
export {applyChanges} from './util/change_detection_utils';
export {Listener, getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './util/discovery_utils';

View File

@ -32,9 +32,6 @@ export function detectChanges(component: {}): void {
* detection can be scheduled per component tree.
*
* @param component Component to mark as dirty.
*
* @publicApi
* @globalApi ng
*/
export function markDirty(component: {}): void {
ngDevMode && assertDefined(component, 'component');

View File

@ -7,8 +7,6 @@
*/
import {assertDefined} from '../../util/assert';
import {global} from '../../util/global';
import {markDirty} from '../instructions/all';
import {applyChanges} from './change_detection_utils';
import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './discovery_utils';
@ -50,7 +48,6 @@ export function publishDefaultGlobalUtils() {
publishGlobalUtil('getInjector', getInjector);
publishGlobalUtil('getRootComponents', getRootComponents);
publishGlobalUtil('getDirectives', getDirectives);
publishGlobalUtil('markDirty', markDirty);
publishGlobalUtil('applyChanges', applyChanges);
}
}

View File

@ -5,7 +5,6 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ɵmarkDirty as markDirty} from '@angular/core';
import {applyChanges} from '../../src/render3/util/change_detection_utils';
import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from '../../src/render3/util/discovery_utils';
@ -45,8 +44,6 @@ describe('global utils', () => {
it('should publish getInjector', () => { assertPublished('getInjector', getInjector); });
it('should publish markDirty', () => { assertPublished('markDirty', markDirty); });
it('should publish applyChanges', () => { assertPublished('applyChanges', applyChanges); });
});
});

View File

@ -23,5 +23,3 @@ export interface Listener {
type: 'dom' | 'output';
useCapture: boolean;
}
export declare function markDirty(component: {}): void;