test(ivy): add global utils to the public_api_guard test (#27008)
This API is part of our public api surface and needs to be monitored by the public_api_guard. I also had to go back and mark all of the exported functions with @publicApi jsdoc tag. PR Close #27008
This commit is contained in:

committed by
Andrew Kushnir

parent
e618032d53
commit
499e303ea3
@ -1,3 +1,14 @@
|
||||
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
||||
load(":public_api_guard.bzl", "generate_targets")
|
||||
|
||||
generate_targets(glob(["**/*.d.ts"]))
|
||||
generate_targets(glob(["*/**/*.d.ts"]))
|
||||
|
||||
ts_api_guardian_test(
|
||||
name = "ng_global_utils_api",
|
||||
actual = "angular/packages/core/src/render3/global_utils_api.d.ts",
|
||||
data = [
|
||||
":global_utils.d.ts",
|
||||
"//packages/core",
|
||||
],
|
||||
golden = "angular/tools/public_api_guard/global_utils.d.ts",
|
||||
)
|
||||
|
11
tools/public_api_guard/global_utils.d.ts
vendored
Normal file
11
tools/public_api_guard/global_utils.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export declare function getComponent<T = {}>(target: {}): T | null;
|
||||
|
||||
export declare function getDirectives(target: {}): Array<{}>;
|
||||
|
||||
export declare function getHostComponent<T = {}>(target: {}): T | null;
|
||||
|
||||
export declare function getInjector(target: {}): Injector;
|
||||
|
||||
export declare function getPlayers(ref: ComponentInstance | DirectiveInstance | HTMLElement): Player[];
|
||||
|
||||
export declare function getRootComponents(target: {}): any[];
|
Reference in New Issue
Block a user