chore: move usage of expand type to @backstage/types
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { ApiRef, createApiRef } from '@backstage/core-plugin-api';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { Expand, ExpandRecursive, Observable } from '@backstage/types';
|
||||
import { TranslationRef } from '../../translation';
|
||||
|
||||
/**
|
||||
@@ -98,22 +98,6 @@ type CollapsedMessages<TMessages extends { [key in string]: string }> = {
|
||||
: key]: TMessages[key];
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper type that expands type hints
|
||||
*
|
||||
* @ignore
|
||||
*/
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
|
||||
/**
|
||||
* Helper type that expands type hints recursively
|
||||
*
|
||||
* @ignore
|
||||
*/
|
||||
type ExpandRecursive<T> = T extends infer O
|
||||
? { [K in keyof O]: ExpandRecursive<O[K]> }
|
||||
: never;
|
||||
|
||||
/**
|
||||
* Trim away whitespace
|
||||
*
|
||||
|
||||
@@ -17,13 +17,6 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { FrontendPlugin } from './wiring';
|
||||
|
||||
// TODO(Rugvip): This might be a quite useful utility type, maybe add to @backstage/types?
|
||||
/**
|
||||
* Utility type to expand type aliases into their equivalent type.
|
||||
* @ignore
|
||||
*/
|
||||
export type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
|
||||
/** @public */
|
||||
export type CoreProgressProps = {};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { ApiHolder, AppNode } from '../apis';
|
||||
import { Expand } from '../types';
|
||||
import { Expand } from '@backstage/types';
|
||||
import {
|
||||
ResolveInputValueOverrides,
|
||||
resolveInputOverrides,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { ApiHolder, AppNode } from '../apis';
|
||||
import { Expand } from '../types';
|
||||
import { Expand } from '@backstage/types';
|
||||
import {
|
||||
ExtensionDefinition,
|
||||
ResolvedExtensionInputs,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { AppNode } from '../apis';
|
||||
import { Expand } from '../types';
|
||||
import { Expand } from '@backstage/types';
|
||||
import { ResolvedExtensionInput } from './createExtension';
|
||||
import {
|
||||
ExtensionDataContainer,
|
||||
|
||||
Reference in New Issue
Block a user