test-utils: doc + API report fixup

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-11-18 11:28:26 +01:00
parent 0c92f73a11
commit 7ff56c2330
2 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -191,11 +191,10 @@ export type TestApiProviderProps<TApiPairs extends any[]> = {
// @public
export class TestApiRegistry implements ApiHolder {
// (undocumented)
get<T>(api: ApiRef<T>): T | undefined;
static from<TApiPairs extends any[]>(
...apis: readonly [...TestApiProviderPropsApiPairs<TApiPairs>]
): TestApiRegistry;
get<T>(api: ApiRef<T>): T | undefined;
}
// @public
@@ -73,7 +73,11 @@ export class TestApiRegistry implements ApiHolder {
private constructor(private readonly apis: Map<string, unknown>) {}
/** {@inheritdoc @backstage/core-plugin-api#ApiHolder.get} */
/**
* Returns an implementation of the API.
*
* @public
*/
get<T>(api: ApiRef<T>): T | undefined {
return this.apis.get(api.id) as T | undefined;
}