Address review feedback

- Remove {@link} from @deprecated tag (freben feedback)
- Use Object.hasOwn instead of hasOwnProperty
- Use NotImplementedError instead of plain Error
- Add @backstage/errors dependency
- Add tests for withApis in core-compat-api

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-05 12:30:47 +01:00
parent b15a685e52
commit fa0277093e
5 changed files with 95 additions and 9 deletions
@@ -57,7 +57,7 @@ export function useApi<T>(apiRef: ApiRef<T>): T {
* Wrapper for giving component an API context.
*
* @param apis - APIs for the context.
* @deprecated Use {@link withApis} from `@backstage/core-compat-api` instead.
* @deprecated Use `withApis` from `@backstage/core-compat-api` instead.
* @public
*/
export function withApis<T extends {}>(apis: TypesToApiRefs<T>) {