core-plugin-api: Deprecate unused types

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-11-09 09:36:42 +01:00
parent a91b08045a
commit e059aea7b9
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-plugin-api': patch
---
Deprecate unused ApiRef types
@@ -35,6 +35,7 @@ export type AnyApiRef = ApiRef<unknown>;
* Transforms ApiRef type into its inner API type.
*
* @public
* @deprecated unused type.
*/
export type ApiRefType<T> = T extends ApiRef<infer U> ? U : never;
@@ -51,6 +52,7 @@ export type TypesToApiRefs<T> = { [key in keyof T]: ApiRef<T[key]> };
* Reverse type transform of {@link TypesToApiRefs}.
*
* @public
* @deprecated unused type.
*/
export type ApiRefsToTypes<T extends { [key in string]: ApiRef<unknown> }> = {
[key in keyof T]: ApiRefType<T[key]>;