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:
		
							parent
							
								
									471375adbe
								
							
						
					
					
						commit
						cd9ae66b35
					
				| @ -15,6 +15,5 @@ | |||||||
|  * file in the public_api_guard test. |  * file in the public_api_guard test. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| export {markDirty} from './instructions/all'; |  | ||||||
| export {applyChanges} from './util/change_detection_utils'; | export {applyChanges} from './util/change_detection_utils'; | ||||||
| export {Listener, getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './util/discovery_utils'; | export {Listener, getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './util/discovery_utils'; | ||||||
|  | |||||||
| @ -32,9 +32,6 @@ export function detectChanges(component: {}): void { | |||||||
|  * detection can be scheduled per component tree. |  * detection can be scheduled per component tree. | ||||||
|  * |  * | ||||||
|  * @param component Component to mark as dirty. |  * @param component Component to mark as dirty. | ||||||
|  * |  | ||||||
|  * @publicApi |  | ||||||
|  * @globalApi ng |  | ||||||
|  */ |  */ | ||||||
| export function markDirty(component: {}): void { | export function markDirty(component: {}): void { | ||||||
|   ngDevMode && assertDefined(component, 'component'); |   ngDevMode && assertDefined(component, 'component'); | ||||||
|  | |||||||
| @ -7,8 +7,6 @@ | |||||||
|  */ |  */ | ||||||
| import {assertDefined} from '../../util/assert'; | import {assertDefined} from '../../util/assert'; | ||||||
| import {global} from '../../util/global'; | import {global} from '../../util/global'; | ||||||
| import {markDirty} from '../instructions/all'; |  | ||||||
| 
 |  | ||||||
| import {applyChanges} from './change_detection_utils'; | import {applyChanges} from './change_detection_utils'; | ||||||
| import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './discovery_utils'; | import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './discovery_utils'; | ||||||
| 
 | 
 | ||||||
| @ -50,7 +48,6 @@ export function publishDefaultGlobalUtils() { | |||||||
|     publishGlobalUtil('getInjector', getInjector); |     publishGlobalUtil('getInjector', getInjector); | ||||||
|     publishGlobalUtil('getRootComponents', getRootComponents); |     publishGlobalUtil('getRootComponents', getRootComponents); | ||||||
|     publishGlobalUtil('getDirectives', getDirectives); |     publishGlobalUtil('getDirectives', getDirectives); | ||||||
|     publishGlobalUtil('markDirty', markDirty); |  | ||||||
|     publishGlobalUtil('applyChanges', applyChanges); |     publishGlobalUtil('applyChanges', applyChanges); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -5,7 +5,6 @@ | |||||||
|  * Use of this source code is governed by an MIT-style license that can be |  * 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
 |  * 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 {applyChanges} from '../../src/render3/util/change_detection_utils'; | ||||||
| import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from '../../src/render3/util/discovery_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 getInjector', () => { assertPublished('getInjector', getInjector); }); | ||||||
| 
 | 
 | ||||||
|     it('should publish markDirty', () => { assertPublished('markDirty', markDirty); }); |  | ||||||
| 
 |  | ||||||
|     it('should publish applyChanges', () => { assertPublished('applyChanges', applyChanges); }); |     it('should publish applyChanges', () => { assertPublished('applyChanges', applyChanges); }); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								tools/public_api_guard/global_utils.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								tools/public_api_guard/global_utils.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -23,5 +23,3 @@ export interface Listener { | |||||||
|     type: 'dom' | 'output'; |     type: 'dom' | 'output'; | ||||||
|     useCapture: boolean; |     useCapture: boolean; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| export declare function markDirty(component: {}): void; |  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user