backend-plugin-api: tighten internal any usage (#33867)

* backend-plugin-api: tighten internal any usage

Replace internal `any` type annotations with proper types:

- Use `'root' | 'plugin'` union in DepsToInstances conditional type
  and createServiceRef implementation signature
- Use Error type guard with object cast fallback in
  isDatabaseConflictError instead of `as any`

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* Use isError in isDatabaseConflictError

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* Update changeset wording per review feedback

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-04-13 14:58:03 +02:00
committed by GitHub
parent d815917053
commit 68c557b381
4 changed files with 15 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-plugin-api': patch
---
Added stricter type checks in `isDatabaseConflictError`.