docs(ivy): document global debugging utilities and clean up API (#34453)

Cleans up the public API of the global debugging utilities, documents them and exposes them in the API docs.

PR Close #34453
This commit is contained in:
crisbeto
2019-12-19 21:25:42 +01:00
committed by Andrew Kushnir
parent 7bca243ab0
commit 15c732c240
14 changed files with 240 additions and 171 deletions

View File

@ -7,7 +7,8 @@
*/
import {ɵmarkDirty as markDirty} from '@angular/core';
import {getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getRootComponents, getViewComponent} from '../../src/render3/util/discovery_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 {GLOBAL_PUBLISH_EXPANDO_KEY, GlobalDevModeContainer, publishDefaultGlobalUtils, publishGlobalUtil} from '../../src/render3/util/global_utils';
import {global} from '../../src/util/global';
@ -31,8 +32,8 @@ describe('global utils', () => {
it('should publish getListeners', () => { assertPublished('getListeners', getListeners); });
it('should publish getViewComponent',
() => { assertPublished('getViewComponent', getViewComponent); });
it('should publish getOwningComponent',
() => { assertPublished('getOwningComponent', getOwningComponent); });
it('should publish getRootComponents',
() => { assertPublished('getRootComponents', getRootComponents); });
@ -45,6 +46,8 @@ describe('global utils', () => {
it('should publish getInjector', () => { assertPublished('getInjector', getInjector); });
it('should publish markDirty', () => { assertPublished('markDirty', markDirty); });
it('should publish applyChanges', () => { assertPublished('applyChanges', applyChanges); });
});
});